diff options
| author | 2022-03-06 19:54:40 +0100 | |
|---|---|---|
| committer | 2022-10-06 21:00:52 +0200 | |
| commit | ba34cf0a691bc73ae6b2d8db6019b1f10d22dde5 (patch) | |
| tree | defc91f25d4430b62bdf45af4933edbf46171f93 /src/video_core/renderer_opengl | |
| parent | Shader Decompiler: Fix dangerous behavior of invalid iterator insertion. (diff) | |
| download | yuzu-ba34cf0a691bc73ae6b2d8db6019b1f10d22dde5.tar.gz yuzu-ba34cf0a691bc73ae6b2d8db6019b1f10d22dde5.tar.xz yuzu-ba34cf0a691bc73ae6b2d8db6019b1f10d22dde5.zip | |
Shader Decompiler: Check for shift when deriving composite samplers.
Diffstat (limited to 'src/video_core/renderer_opengl')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_compute_pipeline.cpp | 5 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_graphics_pipeline.cpp | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/video_core/renderer_opengl/gl_compute_pipeline.cpp b/src/video_core/renderer_opengl/gl_compute_pipeline.cpp index 26b51f442..26d066004 100644 --- a/src/video_core/renderer_opengl/gl_compute_pipeline.cpp +++ b/src/video_core/renderer_opengl/gl_compute_pipeline.cpp | |||
| @@ -100,8 +100,9 @@ void ComputePipeline::Configure() { | |||
| 100 | const u32 secondary_offset{desc.secondary_cbuf_offset + index_offset}; | 100 | const u32 secondary_offset{desc.secondary_cbuf_offset + index_offset}; |
| 101 | const GPUVAddr separate_addr{cbufs[desc.secondary_cbuf_index].Address() + | 101 | const GPUVAddr separate_addr{cbufs[desc.secondary_cbuf_index].Address() + |
| 102 | secondary_offset}; | 102 | secondary_offset}; |
| 103 | const u32 lhs_raw{gpu_memory->Read<u32>(addr)}; | 103 | const u32 lhs_raw{gpu_memory->Read<u32>(addr) << desc.shift_left}; |
| 104 | const u32 rhs_raw{gpu_memory->Read<u32>(separate_addr)}; | 104 | const u32 rhs_raw{gpu_memory->Read<u32>(separate_addr) |
| 105 | << desc.secondary_shift_left}; | ||
| 105 | return TexturePair(lhs_raw | rhs_raw, via_header_index); | 106 | return TexturePair(lhs_raw | rhs_raw, via_header_index); |
| 106 | } | 107 | } |
| 107 | } | 108 | } |
diff --git a/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp b/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp index c877d7792..41493a7da 100644 --- a/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp +++ b/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp | |||
| @@ -312,8 +312,9 @@ void GraphicsPipeline::ConfigureImpl(bool is_indexed) { | |||
| 312 | const u32 second_offset{desc.secondary_cbuf_offset + index_offset}; | 312 | const u32 second_offset{desc.secondary_cbuf_offset + index_offset}; |
| 313 | const GPUVAddr separate_addr{cbufs[desc.secondary_cbuf_index].address + | 313 | const GPUVAddr separate_addr{cbufs[desc.secondary_cbuf_index].address + |
| 314 | second_offset}; | 314 | second_offset}; |
| 315 | const u32 lhs_raw{gpu_memory->Read<u32>(addr)}; | 315 | const u32 lhs_raw{gpu_memory->Read<u32>(addr) << desc.shift_left}; |
| 316 | const u32 rhs_raw{gpu_memory->Read<u32>(separate_addr)}; | 316 | const u32 rhs_raw{gpu_memory->Read<u32>(separate_addr) |
| 317 | << desc.secondary_shift_left}; | ||
| 317 | const u32 raw{lhs_raw | rhs_raw}; | 318 | const u32 raw{lhs_raw | rhs_raw}; |
| 318 | return TexturePair(raw, via_header_index); | 319 | return TexturePair(raw, via_header_index); |
| 319 | } | 320 | } |