summaryrefslogtreecommitdiffstats
path: root/src/video_core/engines/maxwell_3d.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-06-07 00:42:20 +0200
committerGitHub <noreply@github.com>2021-06-07 00:42:20 +0200
commitafd0e2eb0b1c4a998cf1d28ad864ee70ac31147f (patch)
treeab65f4ba2c2dfb81b737d65b612467458ea12dbd /src/video_core/engines/maxwell_3d.cpp
parentMerge pull request #6415 from lioncash/res-nodisc (diff)
parentbuffer_cache: Simplify uniform disabling logic (diff)
downloadyuzu-afd0e2eb0b1c4a998cf1d28ad864ee70ac31147f.tar
yuzu-afd0e2eb0b1c4a998cf1d28ad864ee70ac31147f.tar.gz
yuzu-afd0e2eb0b1c4a998cf1d28ad864ee70ac31147f.tar.bz2
yuzu-afd0e2eb0b1c4a998cf1d28ad864ee70ac31147f.tar.lz
yuzu-afd0e2eb0b1c4a998cf1d28ad864ee70ac31147f.tar.xz
yuzu-afd0e2eb0b1c4a998cf1d28ad864ee70ac31147f.tar.zst
yuzu-afd0e2eb0b1c4a998cf1d28ad864ee70ac31147f.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/engines/maxwell_3d.cpp8
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);
}