summaryrefslogtreecommitdiff
path: root/src/video_core/dirty_flags.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core/dirty_flags.cpp')
-rw-r--r--src/video_core/dirty_flags.cpp24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/video_core/dirty_flags.cpp b/src/video_core/dirty_flags.cpp
index 9dc4341f0..1039e036f 100644
--- a/src/video_core/dirty_flags.cpp
+++ b/src/video_core/dirty_flags.cpp
@@ -17,21 +17,23 @@ using Tegra::Engines::Maxwell3D;
17void SetupDirtyVertexBuffers(Maxwell3D::DirtyState::Tables& tables) { 17void SetupDirtyVertexBuffers(Maxwell3D::DirtyState::Tables& tables) {
18 static constexpr std::size_t num_array = 3; 18 static constexpr std::size_t num_array = 3;
19 for (std::size_t i = 0; i < Maxwell3D::Regs::NumVertexArrays; ++i) { 19 for (std::size_t i = 0; i < Maxwell3D::Regs::NumVertexArrays; ++i) {
20 const std::size_t array_offset = OFF(vertex_array) + i * NUM(vertex_array[0]); 20 const std::size_t array_offset = OFF(vertex_streams) + i * NUM(vertex_streams[0]);
21 const std::size_t limit_offset = OFF(vertex_array_limit) + i * NUM(vertex_array_limit[0]); 21 const std::size_t limit_offset =
22 OFF(vertex_stream_limits) + i * NUM(vertex_stream_limits[0]);
22 23
23 FillBlock(tables, array_offset, num_array, VertexBuffer0 + i, VertexBuffers); 24 FillBlock(tables, array_offset, num_array, VertexBuffer0 + i, VertexBuffers);
24 FillBlock(tables, limit_offset, NUM(vertex_array_limit), VertexBuffer0 + i, VertexBuffers); 25 FillBlock(tables, limit_offset, NUM(vertex_stream_limits), VertexBuffer0 + i,
26 VertexBuffers);
25 } 27 }
26} 28}
27 29
28void SetupIndexBuffer(Maxwell3D::DirtyState::Tables& tables) { 30void SetupIndexBuffer(Maxwell3D::DirtyState::Tables& tables) {
29 FillBlock(tables[0], OFF(index_array), NUM(index_array), IndexBuffer); 31 FillBlock(tables[0], OFF(index_buffer), NUM(index_buffer), IndexBuffer);
30} 32}
31 33
32void SetupDirtyDescriptors(Maxwell3D::DirtyState::Tables& tables) { 34void SetupDirtyDescriptors(Maxwell3D::DirtyState::Tables& tables) {
33 FillBlock(tables[0], OFF(tic), NUM(tic), Descriptors); 35 FillBlock(tables[0], OFF(tex_header), NUM(tex_header), Descriptors);
34 FillBlock(tables[0], OFF(tsc), NUM(tsc), Descriptors); 36 FillBlock(tables[0], OFF(tex_sampler), NUM(tex_sampler), Descriptors);
35} 37}
36 38
37void SetupDirtyRenderTargets(Maxwell3D::DirtyState::Tables& tables) { 39void SetupDirtyRenderTargets(Maxwell3D::DirtyState::Tables& tables) {
@@ -42,7 +44,7 @@ void SetupDirtyRenderTargets(Maxwell3D::DirtyState::Tables& tables) {
42 FillBlock(tables[0], begin + rt * num_per_rt, num_per_rt, ColorBuffer0 + rt); 44 FillBlock(tables[0], begin + rt * num_per_rt, num_per_rt, ColorBuffer0 + rt);
43 } 45 }
44 FillBlock(tables[1], begin, num, RenderTargets); 46 FillBlock(tables[1], begin, num, RenderTargets);
45 FillBlock(tables[0], OFF(render_area), NUM(render_area), RenderTargets); 47 FillBlock(tables[0], OFF(surface_clip), NUM(surface_clip), RenderTargets);
46 48
47 tables[0][OFF(rt_control)] = RenderTargets; 49 tables[0][OFF(rt_control)] = RenderTargets;
48 tables[1][OFF(rt_control)] = RenderTargetControl; 50 tables[1][OFF(rt_control)] = RenderTargetControl;
@@ -52,15 +54,15 @@ void SetupDirtyRenderTargets(Maxwell3D::DirtyState::Tables& tables) {
52 const u8 flag = zeta_flags[i]; 54 const u8 flag = zeta_flags[i];
53 auto& table = tables[i]; 55 auto& table = tables[i];
54 table[OFF(zeta_enable)] = flag; 56 table[OFF(zeta_enable)] = flag;
55 table[OFF(zeta_width)] = flag; 57 table[OFF(zeta_size.width)] = flag;
56 table[OFF(zeta_height)] = flag; 58 table[OFF(zeta_size.height)] = flag;
57 FillBlock(table, OFF(zeta), NUM(zeta), flag); 59 FillBlock(table, OFF(zeta), NUM(zeta), flag);
58 } 60 }
59} 61}
60 62
61void SetupDirtyShaders(Maxwell3D::DirtyState::Tables& tables) { 63void SetupDirtyShaders(Maxwell3D::DirtyState::Tables& tables) {
62 FillBlock(tables[0], OFF(shader_config[0]), 64 FillBlock(tables[0], OFF(pipelines), NUM(pipelines) * Maxwell3D::Regs::MaxShaderProgram,
63 NUM(shader_config[0]) * Maxwell3D::Regs::MaxShaderProgram, Shaders); 65 Shaders);
64} 66}
65} // Anonymous namespace 67} // Anonymous namespace
66 68