aboutsummaryrefslogtreecommitdiff
path: root/src/video_core
AgeCommit message (Collapse)Author
2020-05-02vk_graphics_pipeline: Implement rasterizer_enable on VulkanReinUsesLisp
We can simply enable rasterizer discard matching the current pipeline key.
2020-05-02Merge pull request #3693 from ReinUsesLisp/clean-samplersbunnei
shader/texture: Support multiple unknown sampler properties
2020-05-01fixed_pipeline_state: explicitly use template keyword after 1f345ebe3a55Jan Beich
In file included from src/video_core/renderer_opengl/renderer_opengl.cpp:25: In file included from src/./video_core/renderer_opengl/gl_rasterizer.h:26: In file included from src/./video_core/renderer_opengl/gl_fence_manager.h:11: src/./video_core/fence_manager.h:91:32: error: use 'template' keyword to treat 'Write' as a dependent template name memory_manager.Write<u32>(current_fence->GetAddress(), current_fence->GetPayload()); ^ template src/./video_core/fence_manager.h:137:32: error: use 'template' keyword to treat 'Write' as a dependent template name memory_manager.Write<u32>(current_fence->GetAddress(), current_fence->GetPayload()); ^ template
2020-04-30maxwell_to_vk: implement missing signed int formatsDan
2020-04-30texture: Implement R8G8UIMorph
- Used by The Walking Dead: The Final Season
2020-04-30Merge pull request #3807 from ReinUsesLisp/fix-depth-clampbunnei
maxwell_3d: Fix depth clamping register
2020-04-30Merge pull request #3799 from ReinUsesLisp/iadd-ccbunnei
shader: Implement P2R CC, IADD Rd.CC and IADD.X
2020-04-30Merge pull request #3805 from ReinUsesLisp/preserve-contentsbunnei
texture_cache: Reintroduce preserve_contents accurately
2020-04-30Merge pull request #3788 from FernandoS27/revertbunnei
Revert: shader_decode: Fix LD, LDG when track constant buffer.
2020-04-28vulkan: Remove unnecessary includesLioncash
Reduces some header churn and reduces rebuilds when some header internals change. While we're at it we can also resolve a missing include in buffer_cache.
2020-04-28shader/arithmetic_integer: Fix tracking issue in temporaryReinUsesLisp
This temporary is not needed as we mark Rd.CC + IADD.X as unimplemented. It caused issues when tracking global buffers.
2020-04-28Clang Format and Documentation.Fernando Sahmkow
2020-04-28MaxwellDMA: Optimize micro copies.Fernando Sahmkow
2020-04-28Merge pull request #3784 from ReinUsesLisp/shader-memory-utilbunnei
shader/memory_util: Deduplicate code
2020-04-28vk_rasterizer: Skip index buffer setup when vertices are zeroReinUsesLisp
Xenoblade 2 invokes a draw call with zero vertices. This is likely due to indirect drawing (glDrawArraysIndirect). This causes a crash in the staging buffer pool when trying to create a buffer with a size of zero. To workaround this, skip index buffer setup entirely when the number of indices is zero.
2020-04-28{maxwell_3d,buffer_cache}: Implement memory barriers using 3D registersReinUsesLisp
Drop MemoryBarrier from the buffer cache and use Maxwell3D's register WaitForIdle. To implement this on OpenGL we just call glMemoryBarrier with the necessary bits. Vulkan lacks this synchronization primitive, so we set an event and immediately wait for it. This is not a pretty solution, but it's what Vulkan can do without submitting the current command buffer to the queue (which ends up being more expensive on the CPU).
2020-04-27VideoCore/GPU: Delegate subchannel engines to the dma pusher.Fernando Sahmkow
2020-04-27VideoCore/Engines: Refactor Engines CallMethod.Fernando Sahmkow
2020-04-27maxwell_3d: Fix depth clamping registerReinUsesLisp
Using deko3d as reference: https://github.com/devkitPro/deko3d/blob/4e47ba0013552e592a86ab7a2510d1e7dadf236a/source/maxwell/gpu_3d_state.cpp#L42 We were using bits 3 and 4 to determine depth clamping, but these are the same both enabled and disabled: state->depthClampEnable ? 0x101A : 0x181D The same happens on Nvidia's OpenGL driver, where they do something like this (default capabilities, GL 4.5 compatibility): (state & DEPTH_CLAMP) != 0 ? 0x201a : 0x281c There's always a difference between the first bits in this register, but bit 11 is consistently disabled on both deko3d/NVN and OpenGL. This commit changes yuzu's behaviour to use bit 11 to determine depth clamping. - Fixes depth issues on Super Mario Odyssey's intro.
2020-04-27Merge pull request #3766 from ReinUsesLisp/renderpass-cache-keyFernando Sahmkow
vk_renderpass_cache: Pack renderpass cache key and unify keys
2020-04-27Merge pull request #3756 from ReinUsesLisp/integrated-devicesFernando Sahmkow
vk_memory_manager: Remove unified memory model flag
2020-04-27Merge pull request #3742 from FernandoS27/command-listbunnei
Optimize GPU Command Lists and Introduce Fast GPU Time Option
2020-04-26texture_cache: Reintroduce preserve_contents accuratelyReinUsesLisp
This reverts commit 94b0e2e5dae4e0bd0021ac2d8fe1ff904a93ee69. preserve_contents proved to be a meaningful optimization. This commit reintroduces it but properly implemented on OpenGL. We have to make sure the clear removes all the previous contents of the image. It's not currently implemented on Vulkan because we can do smart things there that's preferred to be introduced in a separate commit.
2020-04-26Merge pull request #3753 from ReinUsesLisp/ac-vulkanRodrigo Locatti
{gl,vk}_rasterizer: Add lazy default buffer maker and use it for empty buffers
2020-04-26shader/memory_util: Deduplicate codeReinUsesLisp
Deduplicate code shared between vk_pipeline_cache and gl_shader_cache as well as shader decoder code. While we are at it, fix a bug in gl_shader_cache where compute shaders had an start offset of a stage shader.
2020-04-25shader/arithmetic_integer: Fix edge case and mark IADD.X Rd.CC as unimplementedReinUsesLisp
IADD.X Rd.CC requires some extra logic that is not currently implemented. Abort when this is hit.
2020-04-25shader/arithmetic_integer: Change IAdd to UAdd to avoid signed overflowReinUsesLisp
Signed integer addition overflow might be undefined behavior. It's free to change operations to UAdd and use unsigned integers to avoid potential bugs.
2020-04-25shader/arithmetic_integer: Implement IADD.XReinUsesLisp
IADD.X takes the carry flag and adds it to the result. This is generally used to emulate 64-bit operations with 32-bit registers.
2020-04-25shader/arithmetic_integer: Implement CC for IADDReinUsesLisp
2020-04-25decode/register_set_predicate: Implement CCReinUsesLisp
P2R CC takes the state of condition codes and puts them into a register. We already have this implemented for PR (predicates). This commit implements CC over that.
2020-04-25decode/register_set_predicate: Use move for shared pointersReinUsesLisp
Avoid atomic counters used by shared pointers.
2020-04-25Merge pull request #3721 from ReinUsesLisp/sort-devicesbunnei
vulkan/wrapper: Sort physical devices
2020-04-25Merge pull request #3734 from ReinUsesLisp/half-float-modsbunnei
decode/arithmetic_half: Fix HADD2 and HMUL2 absolute and negation bits
2020-04-24vk_rasterizer: Pack texceptions and color formats on invalid formatsReinUsesLisp
Sometimes for unknown reasons NVN games can bind a render target format of 0. This may be a yuzu bug. With the commits before this the formats were specified without being "packed", assuming all formats and texceptions will be written like in the color_attachments vector. To address this issue, iterate all render targets and pack them as they are valid. This way they will match color_attachments. - Fixes validation errors and graphical issues on Breath of the Wild.
2020-04-24Merge pull request #3749 from ReinUsesLisp/lea-immbunnei
shader/arithmetic_integer: Fix LEA_IMM encoding
2020-04-24Revert: shader_decode: Fix LD, LDG when track constant buffer.Fernando Sahmkow
2020-04-24Fix -Wdeprecated-copy warning.Markus Wick
2020-04-24Fix -Werror=conversion error.Markus Wick
2020-04-23decode/arithmetic_half: Fix HADD2 and HMUL2 absolute and negation bitsReinUsesLisp
The encoding for negation and absolute value was wrong. Extracting is now done manually. Similar instructions having different encodings is the rule, not the exception. To keep sanity and readability I preferred to extract the desired bit manually. This is implemented against nxas: https://github.com/ReinUsesLisp/nxas/blob/8dbc38995711cc12206aa370145a3a02665fd989/table.h#L68 That is itself tested against nvdisasm (Nvidia's official disassembler).
2020-04-23shader/texture: Support multiple unknown sampler propertiesReinUsesLisp
This allows deducing some properties from the texture instruction before asking the runtime. By doing this we can handle type mismatches in some instructions from the renderer instead of the shader decoder. Fixes texelFetch issues with games using 2D texture instructions on a 1D sampler.
2020-04-23shader_ir: Turn classes into data structuresReinUsesLisp
2020-04-23vk_rasterizer: Fix framebuffer creation validation errorsReinUsesLisp
Framebuffer creation was ignoring the number of color attachments.
2020-04-23vk_pipeline_cache: Unify pipeline cache keys into a single operationReinUsesLisp
This allows us to call Common::CityHash and std::memcmp only once for GraphicsPipelineCacheKey. While we are at it, do the same for compute.
2020-04-23vk_renderpass_cache: Pack renderpass cache key to 12 bytesReinUsesLisp
2020-04-23kernel: memory: Improve implementation of device shared memory. (#3707)bunnei
* kernel: memory: Improve implementation of device shared memory. * fixup! kernel: memory: Improve implementation of device shared memory. * fixup! kernel: memory: Improve implementation of device shared memory.
2020-04-23Clang Format.Fernando Sahmkow
2020-04-23GPU: Add Fast GPU Time Option.Fernando Sahmkow
2020-04-23Maxwell3D: Process Macros on MultiMethod.Fernando Sahmkow
2020-04-23DMAPusher: Propagate multimethod writes into the engines.Fernando Sahmkow
2020-04-23Merge pull request #3697 from lioncash/declarationsbunnei
CMakeLists: Enable -Wmissing-declarations on Linux builds