diff options
| author | 2021-05-27 16:47:49 -0300 | |
|---|---|---|
| committer | 2021-07-22 21:51:33 -0400 | |
| commit | 3b595fe8b28001eed4a936e2a7b465bd67dcc4b7 (patch) | |
| tree | f34a71f52313a5ea254eefb42a4d83eef2ccb52d | |
| parent | glasm: Fix global memory fallbacks (diff) | |
| download | yuzu-3b595fe8b28001eed4a936e2a7b465bd67dcc4b7.tar.gz yuzu-3b595fe8b28001eed4a936e2a7b465bd67dcc4b7.tar.xz yuzu-3b595fe8b28001eed4a936e2a7b465bd67dcc4b7.zip | |
glasm: Prepare XFB from state instead of global registers
| -rw-r--r-- | src/video_core/renderer_opengl/gl_graphics_pipeline.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp b/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp index 19d85c482..38ec88b13 100644 --- a/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp +++ b/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp | |||
| @@ -362,13 +362,11 @@ void GraphicsPipeline::GenerateTransformFeedbackState( | |||
| 362 | const VideoCommon::TransformFeedbackState& xfb_state) { | 362 | const VideoCommon::TransformFeedbackState& xfb_state) { |
| 363 | // TODO(Rodrigo): Inject SKIP_COMPONENTS*_NV when required. An unimplemented message will signal | 363 | // TODO(Rodrigo): Inject SKIP_COMPONENTS*_NV when required. An unimplemented message will signal |
| 364 | // when this is required. | 364 | // when this is required. |
| 365 | const auto& regs{maxwell3d.regs}; | ||
| 366 | |||
| 367 | GLint* cursor{xfb_attribs.data()}; | 365 | GLint* cursor{xfb_attribs.data()}; |
| 368 | GLint* current_stream{xfb_streams.data()}; | 366 | GLint* current_stream{xfb_streams.data()}; |
| 369 | 367 | ||
| 370 | for (size_t feedback = 0; feedback < Maxwell::NumTransformFeedbackBuffers; ++feedback) { | 368 | for (size_t feedback = 0; feedback < Maxwell::NumTransformFeedbackBuffers; ++feedback) { |
| 371 | const auto& layout = regs.tfb_layouts[feedback]; | 369 | const auto& layout = xfb_state.layouts[feedback]; |
| 372 | UNIMPLEMENTED_IF_MSG(layout.stride != layout.varying_count * 4, "Stride padding"); | 370 | UNIMPLEMENTED_IF_MSG(layout.stride != layout.varying_count * 4, "Stride padding"); |
| 373 | if (layout.varying_count == 0) { | 371 | if (layout.varying_count == 0) { |
| 374 | continue; | 372 | continue; |
| @@ -383,7 +381,7 @@ void GraphicsPipeline::GenerateTransformFeedbackState( | |||
| 383 | } | 381 | } |
| 384 | ++current_stream; | 382 | ++current_stream; |
| 385 | 383 | ||
| 386 | const auto& locations = regs.tfb_varying_locs[feedback]; | 384 | const auto& locations = xfb_state.varyings[feedback]; |
| 387 | std::optional<u8> current_index; | 385 | std::optional<u8> current_index; |
| 388 | for (u32 offset = 0; offset < layout.varying_count; ++offset) { | 386 | for (u32 offset = 0; offset < layout.varying_count; ++offset) { |
| 389 | const u8 location = locations[offset]; | 387 | const u8 location = locations[offset]; |