From 1be180b941ac9e0652a6b2d19713ddccd8a5151f Mon Sep 17 00:00:00 2001 From: Samuel Iglesias Gonsalvez Date: Fri, 4 Sep 2015 17:53:48 +0200 Subject: glsl: Add std430 support to program_resource_visitor's member functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit They are used to calculate the offset, array stride of uniform/shader storage buffer variables. Take into account this info to get the right value for std430. v2: - Fix commit log line length and indention. (Jordan) Signed-off-by: Samuel Iglesias Gonsalvez Reviewed-by: Jordan Justen Reviewed-by: Kristian Høgsberg --- src/glsl/linker.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/glsl/linker.h') diff --git a/src/glsl/linker.h b/src/glsl/linker.h index b31052e767e..7c2bd59aeb7 100644 --- a/src/glsl/linker.h +++ b/src/glsl/linker.h @@ -150,6 +150,7 @@ protected: */ virtual void visit_field(const glsl_type *type, const char *name, bool row_major, const glsl_type *record_type, + const unsigned packing, bool last_field); /** @@ -173,10 +174,10 @@ protected: virtual void visit_field(const glsl_struct_field *field); virtual void enter_record(const glsl_type *type, const char *name, - bool row_major); + bool row_major, const unsigned packing); virtual void leave_record(const glsl_type *type, const char *name, - bool row_major); + bool row_major, const unsigned packing); virtual void set_record_array_count(unsigned record_array_count); @@ -190,6 +191,7 @@ private: */ void recursion(const glsl_type *t, char **name, size_t name_length, bool row_major, const glsl_type *record_type, + const unsigned packing, bool last_field, unsigned record_array_count); }; -- cgit v1.2.3