From 4eec3a2a3652317f8e0fa97e0730c297bde8241a Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Fri, 22 Feb 2019 01:13:39 -0500 Subject: glsl: fix recording of variables for XFB in TCS shaders This is purely for conformance, since it's not actually possible to do XFB on TCS output varyings. However we do have to make sure we record the names correctly, and this removes an extra level of array-ness from the names in question. Fixes KHR-GL45.tessellation_shader.single.xfb_captures_data_from_correct_stage v2: Add comment to the new program_resource_visitor::process function. (Ilia Mirkin) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108457 Signed-off-by: Ilia Mirkin Cc: 19.0 Reviewed-by: Timothy Arceri --- src/compiler/glsl/linker.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/compiler/glsl/linker.h') diff --git a/src/compiler/glsl/linker.h b/src/compiler/glsl/linker.h index f6fb00351d4..be92dbf983c 100644 --- a/src/compiler/glsl/linker.h +++ b/src/compiler/glsl/linker.h @@ -134,6 +134,26 @@ public: */ void process(ir_variable *var, bool use_std430_as_default); + /** + * Begin processing a variable + * + * Classes that overload this function should call \c ::process from the + * base class to start the recursive processing of the variable. + * + * \param var The variable that is to be processed + * \param var_type The glsl_type reference of the variable + * + * Calls \c ::visit_field for each leaf of the variable. + * + * \warning + * When processing a uniform block, this entry should only be used in cases + * where the row / column ordering of matrices in the block does not + * matter. For example, enumerating the names of members of the block, but + * not for determining the offsets of members. + */ + void process(ir_variable *var, const glsl_type *var_type, + bool use_std430_as_default); + /** * Begin processing a variable of a structured type. * -- cgit v1.2.3