diff options
| author | 2020-03-06 05:03:13 -0300 | |
|---|---|---|
| committer | 2020-03-13 18:33:05 -0300 | |
| commit | ae6189d7c2d5b5bf7daa4cc5a3ec34805cec7b7e (patch) | |
| tree | f6de40b3d236977bf8ac0a73bbaa61133fdcaac2 /src | |
| parent | vk_shader_decompiler: Use registry for specialization (diff) | |
| download | yuzu-ae6189d7c2d5b5bf7daa4cc5a3ec34805cec7b7e.tar.gz yuzu-ae6189d7c2d5b5bf7daa4cc5a3ec34805cec7b7e.tar.xz yuzu-ae6189d7c2d5b5bf7daa4cc5a3ec34805cec7b7e.zip | |
shader/transform_feedback: Expose buffer stride
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 3 | ||||
| -rw-r--r-- | src/video_core/shader/transform_feedback.cpp | 1 | ||||
| -rw-r--r-- | src/video_core/shader/transform_feedback.h | 1 |
3 files changed, 4 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index 021edf1f6..175145cc1 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp | |||
| @@ -777,7 +777,8 @@ private: | |||
| 777 | } | 777 | } |
| 778 | 778 | ||
| 779 | const VaryingTFB& tfb = it->second; | 779 | const VaryingTFB& tfb = it->second; |
| 780 | return fmt::format("xfb_buffer = {}, xfb_offset = {}", tfb.buffer, tfb.offset); | 780 | return fmt::format("xfb_buffer = {}, xfb_offset = {}, xfb_stride = {}", tfb.buffer, |
| 781 | tfb.offset, tfb.stride); | ||
| 781 | } | 782 | } |
| 782 | 783 | ||
| 783 | void DeclareOutputAttribute(Attribute::Index index) { | 784 | void DeclareOutputAttribute(Attribute::Index index) { |
diff --git a/src/video_core/shader/transform_feedback.cpp b/src/video_core/shader/transform_feedback.cpp index db86c940f..22a933761 100644 --- a/src/video_core/shader/transform_feedback.cpp +++ b/src/video_core/shader/transform_feedback.cpp | |||
| @@ -87,6 +87,7 @@ std::unordered_map<u8, VaryingTFB> BuildTransformFeedback(const GraphicsInfo& in | |||
| 87 | 87 | ||
| 88 | VaryingTFB varying; | 88 | VaryingTFB varying; |
| 89 | varying.buffer = layout.stream; | 89 | varying.buffer = layout.stream; |
| 90 | varying.stride = layout.stride; | ||
| 90 | varying.offset = offset * sizeof(u32); | 91 | varying.offset = offset * sizeof(u32); |
| 91 | varying.components = 1; | 92 | varying.components = 1; |
| 92 | 93 | ||
diff --git a/src/video_core/shader/transform_feedback.h b/src/video_core/shader/transform_feedback.h index 8a8235019..77d05f64c 100644 --- a/src/video_core/shader/transform_feedback.h +++ b/src/video_core/shader/transform_feedback.h | |||
| @@ -13,6 +13,7 @@ namespace VideoCommon::Shader { | |||
| 13 | 13 | ||
| 14 | struct VaryingTFB { | 14 | struct VaryingTFB { |
| 15 | std::size_t buffer; | 15 | std::size_t buffer; |
| 16 | std::size_t stride; | ||
| 16 | std::size_t offset; | 17 | std::size_t offset; |
| 17 | std::size_t components; | 18 | std::size_t components; |
| 18 | }; | 19 | }; |