Преглед изворни кода

shader/transform_feedback: Expose buffer stride

ReinUsesLisp пре 6 година
родитељ
комит
ae6189d7c2

+ 2 - 1
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) {

+ 1 - 0
src/video_core/shader/transform_feedback.cpp

@@ -87,6 +87,7 @@ std::unordered_map<u8, VaryingTFB> BuildTransformFeedback(const GraphicsInfo& in
 
             VaryingTFB varying;
             varying.buffer = layout.stream;
+            varying.stride = layout.stride;
             varying.offset = offset * sizeof(u32);
             varying.components = 1;
 

+ 1 - 0
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;
 };