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 <imirkin@alum.mit.edu>
Cc: 19.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
This commit is contained in:
Ilia Mirkin
2019-02-22 01:13:39 -05:00
committed by Jose Maria Casanova Crespo
parent bf1f49482d
commit 4eec3a2a36
3 changed files with 44 additions and 5 deletions

View File

@@ -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.
*