summaryrefslogtreecommitdiffstats
path: root/src/video_core/engines/maxwell_3d.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-11-27 00:33:22 +0100
committerGitHub <noreply@github.com>2018-11-27 00:33:22 +0100
commit67a154e23da149da29e6bd04ce2fb95f3eb7675a (patch)
tree914026c2130ca51f929127e470608109890ba0a9 /src/video_core/engines/maxwell_3d.cpp
parentGPU States: Implement Polygon Offset. This is used in SMO all the time. (#1784) (diff)
parentgl_rasterizer: Skip VB upload if the state is clean. (diff)
downloadyuzu-67a154e23da149da29e6bd04ce2fb95f3eb7675a.tar
yuzu-67a154e23da149da29e6bd04ce2fb95f3eb7675a.tar.gz
yuzu-67a154e23da149da29e6bd04ce2fb95f3eb7675a.tar.bz2
yuzu-67a154e23da149da29e6bd04ce2fb95f3eb7675a.tar.lz
yuzu-67a154e23da149da29e6bd04ce2fb95f3eb7675a.tar.xz
yuzu-67a154e23da149da29e6bd04ce2fb95f3eb7675a.tar.zst
yuzu-67a154e23da149da29e6bd04ce2fb95f3eb7675a.zip
Diffstat (limited to 'src/video_core/engines/maxwell_3d.cpp')
-rw-r--r--src/video_core/engines/maxwell_3d.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp
index 2bc534be3..f0a5470b9 100644
--- a/src/video_core/engines/maxwell_3d.cpp
+++ b/src/video_core/engines/maxwell_3d.cpp
@@ -135,10 +135,24 @@ void Maxwell3D::WriteReg(u32 method, u32 value, u32 remaining_params) {
if (regs.reg_array[method] != value) {
regs.reg_array[method] = value;
+ // Vertex format
if (method >= MAXWELL3D_REG_INDEX(vertex_attrib_format) &&
method < MAXWELL3D_REG_INDEX(vertex_attrib_format) + regs.vertex_attrib_format.size()) {
dirty_flags.vertex_attrib_format = true;
}
+
+ // Vertex buffer
+ if (method >= MAXWELL3D_REG_INDEX(vertex_array) &&
+ method < MAXWELL3D_REG_INDEX(vertex_array) + 4 * 32) {
+ dirty_flags.vertex_array |= 1u << ((method - MAXWELL3D_REG_INDEX(vertex_array)) >> 2);
+ } else if (method >= MAXWELL3D_REG_INDEX(vertex_array_limit) &&
+ method < MAXWELL3D_REG_INDEX(vertex_array_limit) + 2 * 32) {
+ dirty_flags.vertex_array |=
+ 1u << ((method - MAXWELL3D_REG_INDEX(vertex_array_limit)) >> 1);
+ } else if (method >= MAXWELL3D_REG_INDEX(instanced_arrays) &&
+ method < MAXWELL3D_REG_INDEX(instanced_arrays) + 32) {
+ dirty_flags.vertex_array |= 1u << (method - MAXWELL3D_REG_INDEX(instanced_arrays));
+ }
}
switch (method) {
@@ -270,6 +284,7 @@ void Maxwell3D::ProcessQueryGet() {
query_result.timestamp = CoreTiming::GetTicks();
Memory::WriteBlock(*address, &query_result, sizeof(query_result));
}
+ dirty_flags.OnMemoryWrite();
break;
}
default:
@@ -346,6 +361,7 @@ void Maxwell3D::ProcessCBData(u32 value) {
memory_manager.GpuToCpuAddress(buffer_address + regs.const_buffer.cb_pos);
Memory::Write32(*address, value);
+ dirty_flags.OnMemoryWrite();
// Increment the current buffer position.
regs.const_buffer.cb_pos = regs.const_buffer.cb_pos + 4;