From ae6189d7c2d5b5bf7daa4cc5a3ec34805cec7b7e Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Fri, 6 Mar 2020 05:03:13 -0300 Subject: [PATCH] shader/transform_feedback: Expose buffer stride --- src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 3 ++- src/video_core/shader/transform_feedback.cpp | 1 + src/video_core/shader/transform_feedback.h | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index 021edf1f69..175145cc17 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: } const VaryingTFB& tfb = it->second; - return fmt::format("xfb_buffer = {}, xfb_offset = {}", tfb.buffer, tfb.offset); + return fmt::format("xfb_buffer = {}, xfb_offset = {}, xfb_stride = {}", tfb.buffer, + tfb.offset, tfb.stride); } void DeclareOutputAttribute(Attribute::Index index) { diff --git a/src/video_core/shader/transform_feedback.cpp b/src/video_core/shader/transform_feedback.cpp index db86c940f6..22a933761f 100644 --- a/src/video_core/shader/transform_feedback.cpp +++ b/src/video_core/shader/transform_feedback.cpp @@ -87,6 +87,7 @@ std::unordered_map BuildTransformFeedback(const GraphicsInfo& in VaryingTFB varying; varying.buffer = layout.stream; + varying.stride = layout.stride; varying.offset = offset * sizeof(u32); varying.components = 1; diff --git a/src/video_core/shader/transform_feedback.h b/src/video_core/shader/transform_feedback.h index 8a8235019a..77d05f64c7 100644 --- a/src/video_core/shader/transform_feedback.h +++ b/src/video_core/shader/transform_feedback.h @@ -13,6 +13,7 @@ namespace VideoCommon::Shader { struct VaryingTFB { std::size_t buffer; + std::size_t stride; std::size_t offset; std::size_t components; };