diff options
author | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-06-01 19:26:43 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-06-01 19:26:58 +0200 |
commit | 859ba21f6db184f7ada03314ed02b42e49eb8149 (patch) | |
tree | d6e4b35187bb52371c102b982eb8a90af56420d2 /src/video_core/engines/maxwell_3d.cpp | |
parent | Merge pull request #6396 from lat9nq/mingw-sdl-fix (diff) | |
download | yuzu-859ba21f6db184f7ada03314ed02b42e49eb8149.tar yuzu-859ba21f6db184f7ada03314ed02b42e49eb8149.tar.gz yuzu-859ba21f6db184f7ada03314ed02b42e49eb8149.tar.bz2 yuzu-859ba21f6db184f7ada03314ed02b42e49eb8149.tar.lz yuzu-859ba21f6db184f7ada03314ed02b42e49eb8149.tar.xz yuzu-859ba21f6db184f7ada03314ed02b42e49eb8149.tar.zst yuzu-859ba21f6db184f7ada03314ed02b42e49eb8149.zip |
Diffstat (limited to 'src/video_core/engines/maxwell_3d.cpp')
-rw-r--r-- | src/video_core/engines/maxwell_3d.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp index 75517a4f7..aab6b8f7a 100644 --- a/src/video_core/engines/maxwell_3d.cpp +++ b/src/video_core/engines/maxwell_3d.cpp @@ -578,8 +578,12 @@ void Maxwell3D::ProcessCBBind(size_t stage_index) { buffer.size = regs.const_buffer.cb_size; const bool is_enabled = bind_data.valid.Value() != 0; - const GPUVAddr gpu_addr = is_enabled ? regs.const_buffer.BufferAddress() : 0; - const u32 size = is_enabled ? regs.const_buffer.cb_size : 0; + if (!is_enabled) { + rasterizer->DisableGraphicsUniformBuffer(stage_index, bind_data.index); + return; + } + const GPUVAddr gpu_addr = regs.const_buffer.BufferAddress(); + const u32 size = regs.const_buffer.cb_size; rasterizer->BindGraphicsUniformBuffer(stage_index, bind_data.index, gpu_addr, size); } |