aboutsummaryrefslogtreecommitdiff
path: root/src/video_core
AgeCommit message (Collapse)Author
2020-12-06video_core: Adjust `NUM` macro to avoid Clang warningcomex
The previous definition was: #define NUM(field_name) (sizeof(Maxwell3D::Regs::field_name) / sizeof(u32)) In cases where `field_name` happens to refer to an array, Clang thinks `sizeof(an array value) / sizeof(a type)` is an instance of the idiom where `sizeof` is used to compute an array length. So it thinks the type in the denominator ought to be the array element type, and warns if it isn't, assuming this is a mistake. In reality, `NUM` is not used to get array lengths at all, so there is no mistake. Silence the warning by applying Clang's suggested workaround of parenthesizing the denominator.
2020-12-05maxwell_dma: Rename RenderEnable::Mode::FALSE and TRUE to avoid name conflictcomex
On Apple platforms, FALSE and TRUE are defined as macros by <mach/boolean.h>, which is included by various system headers. Note that there appear to be no actual users of the names to fix up.
2020-12-05video_core: Resolve more variable shadowing scenarios pt.3Lioncash
Cleans out the rest of the occurrences of variable shadowing and makes any further occurrences of shadowing compiler errors.
2020-12-05video_core: Resolve more variable shadowing scenarios pt.2Lioncash
Migrates the video core code closer to enabling variable shadowing warnings as errors. This primarily sorts out shadowing occurrences within the Vulkan code.
2020-12-05Merge pull request #5124 from lioncash/video-shadowbunnei
video_core: Resolve more variable shadowing scenarios
2020-12-04Merge pull request #5127 from FearlessTobi/port-5617bunnei
Port citra-emu/citra#5617: "Fix telemetry-related exit crash from use-after-free"
2020-12-05Fix telemetry-related exit crash from use-after-freeFearlessTobi
Co-Authored-By: xperia64 <xperia64@users.noreply.github.com>
2020-12-04codec: Remove deprecated usage of AVCodecContext::refcounted_framesLioncash
This was only necessary for use with the avcodec_decode_video2/avcoded_decode_audio4 APIs which are also deprecated. Given we use avcodec_send_packet/avcodec_receive_frame, this isn't necessary, this is even indicated directly within the FFmpeg API changes document here on 2017-09-26: https://github.com/FFmpeg/FFmpeg/blob/master/doc/APIchanges#L410 This prevents our code from breaking whenever we update to a newer version of FFmpeg in the future if they ever decide to fully remove this API member.
2020-12-04video_core: Resolve more variable shadowing scenariosLioncash
Resolves variable shadowing scenarios up to the end of the OpenGL code to make it nicer to review. The rest will be resolved in a following commit.
2020-12-04Merge pull request #5064 from lioncash/node-shadowbunnei
node: Eliminate variable shadowing
2020-12-03node: Mark member functions as [[nodiscard]] where applicableLioncash
Prevents logic bugs from accidentally ignoring the return value.
2020-12-03node: Eliminate variable shadowingLioncash
2020-12-03vp9/vic: Resolve pessimizing movesLioncash
Removes the usage of moves that don't result in behavior different from a copy, or otherwise would prevent copy elision from occurring.
2020-12-02Merge pull request #5002 from ameerj/nvdec-frameskipbunnei
nvdec: Queue and display all decoded frames, cleanup decoders
2020-11-30Merge pull request #5013 from ReinUsesLisp/vk-early-zbunnei
vk_shader_decompiler: Implement force early fragment tests
2020-11-26codec: Fix `pragma GCC diagnostic pop` missing corresponding pushcomex
2020-11-26vk_shader_decompiler: Implement force early fragment testsReinUsesLisp
Force early fragment tests when the 3D method is enabled. The established pipeline cache takes care of recompiling if needed. This is implemented only on Vulkan to avoid invalidating the shader cache on OpenGL.
2020-11-26Limit queue size to 10 framesameerj
Workaround for ZLA, which seems to decode and queue twice as many frames as it displays.
2020-11-26Merge pull request #4975 from comex/invalid-syncpoint-idbunnei
nvdrv, video_core: Don't index out of bounds when given invalid syncpoint ID
2020-11-26Address PR feedbackameerj
remove some redundant moves, make deleter match naming guidelines. Co-Authored-By: LC <712067+lioncash@users.noreply.github.com>
2020-11-25Merge pull request #4976 from comex/poll-eventsRodrigo Locatti
Overhaul EmuWindow::PollEvents to fix yuzu-cmd calling SDL_PollEvents off main thread
2020-11-25Queue decoded frames, cleanup decodersameerj
2020-11-25cleanup unneeded comments and newlinesameerj
2020-11-25Refactor MaxwellToSpirvComparison. Use Common::BitCastameerj
Co-Authored-By: Rodrigo Locatti <reinuseslisp@airmail.cc>
2020-11-24Address PR feedback from Reinameerj
2020-11-24vulkan_renderer: Alpha Test Culling Implementationameerj
Used by various textures in many titles, e.g. SSBU menu.
2020-11-24nvdrv, video_core: Don't index out of bounds when given invalid syncpoint IDcomex
- Use .at() instead of raw indexing when dealing with untrusted indices. - For the special case of WaitFence with syncpoint id UINT32_MAX, instead of crashing, log an error and ignore. This is what I get when running Super Mario Maker 2.
2020-11-24Merge pull request #3681 from lioncash/componentRodrigo Locatti
decoder/image: Fix incorrect G24R8 component sizes in GetComponentSize()
2020-11-23Overhaul EmuWindow::PollEvents to fix yuzu-cmd calling SDL_PollEvents off ↵comex
main thread EmuWindow::PollEvents was called from the GPU thread (or the CPU thread in sync-GPU mode) when swapping buffers. It had three implementations: - In GRenderWindow, it didn't actually poll events, just set a flag and emit a signal to indicate that a frame was displayed. - In EmuWindow_SDL2_Hide, it did nothing. - In EmuWindow_SDL2, it did call SDL_PollEvents, but this is wrong because SDL_PollEvents is supposed to be called on the thread that set up video - in this case, the main thread, which was sleeping in a busyloop (regardless of whether sync-GPU was enabled). On macOS this causes a crash. To fix this: - Rename EmuWindow::PollEvents to OnFrameDisplayed, and give it a default implementation that does nothing. - In EmuWindow_SDL2, do not override OnFrameDisplayed, but instead have the main thread call SDL_WaitEvent in a loop.
2020-11-22Merge pull request #4954 from lioncash/compareMorph
gl_rasterizer: Make floating-point literal a float
2020-11-21Merge pull request #4955 from lioncash/move3bunnei
async_shaders: std::move data within QueueVulkanShader()
2020-11-20Merge pull request #4957 from ReinUsesLisp/alpha-test-rtLC
gl_rasterizer: Remove warning of untested alpha test
2020-11-20gl_rasterizer: Remove warning of untested alpha testReinUsesLisp
Alpha test has been proven to only affect the first render target.
2020-11-20Merge pull request #4953 from lioncash/shader-shadowbunnei
shader_bytecode: Eliminate variable shadowing
2020-11-20async_shaders: emplace threads into the worker thread vectorLioncash
Same behavior, but constructs the threads in place instead of moving them.
2020-11-20async_shaders: Simplify implementation of GetCompletedWork()Lioncash
This is equivalent to moving all the contents and then clearing the vector. This avoids a redundant allocation.
2020-11-20async_shaders: Simplify moving data into the pending queueLioncash
2020-11-20async_shaders: std::move data within QueueVulkanShader()Lioncash
Same behavior, but avoids redundant copies. While we're at it, we can simplify the pushing of the parameters into the pending queue.
2020-11-20gl_rasterizer: Make floating-point literal a floatLioncash
Gets rid of an unnecessary expansion from float to double.
2020-11-20shader_bytecode: Make use of [[nodiscard]] where applicableLioncash
Ensures that all queried values are made use of.
2020-11-20shader_bytecode: Eliminate variable shadowingLioncash
2020-11-20Merge pull request #4308 from ReinUsesLisp/maxwell-3d-funcsRodrigo Locatti
maxwell_3d: Move code to separate functions and insert instead of push_back
2020-11-17rasterizer_interface: Make use of [[nodiscard]] where applicableLioncash
2020-11-17render_base: Make use of [[nodiscard]] where applicableLioncash
2020-11-17gpu: Make use of [[nodiscard]] where applicableLioncash
2020-11-11maxwell_3d: Use insert instead of loop push_backReinUsesLisp
This reduces the overhead of bounds checking on each element. It won't reduce the cost of allocation because usually this vector's capacity is usually large enough to hold whatever we push to it.
2020-11-11maxwell_3d: Move code to separate functionsReinUsesLisp
Deduplicate some code and put it in separate functions so it's easier to understand and profile.
2020-11-07video_core: dma_pusher: Remove integrity check on command lists.bunnei
- This seems to cause softlocks in Breath of the Wild.
2020-11-06Merge pull request #4891 from lioncash/clang2bunnei
General: Fix clang build
2020-11-05Merge pull request #4854 from ReinUsesLisp/cube-array-shadowbunnei
shader: Partially implement texture cube array shadow