It is not clear from the GLSL ES 3.00 spec how transform feedback is
supposed to apply to varying structs:
- There is no specification for how the structure is to be packed when
it is recorded into the transform feedback buffer.
- There is no reasonable value for GetTransformFeedbackVarying to
return as the "type" of the variable.
We currently have a Khronos bug requesting clarification on how this
feature is supposed to work
(https://cvs.khronos.org/bugzilla/show_bug.cgi?id=9856).
This patch just disables transform feedback of varying structs for
now; we can implement the proper behaviour once we find out from
Khronos what it is.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
const char *name = this->is_clip_distance_mesa
? "gl_ClipDistanceMESA" : this->var_name;
ir_variable *var = producer->symbols->get_variable(name);
- if (var && var->mode == ir_var_shader_out)
+ if (var && var->mode == ir_var_shader_out) {
+ const glsl_type *type = var->type;
+ while (type->base_type == GLSL_TYPE_ARRAY)
+ type = type->fields.array;
+ if (type->base_type == GLSL_TYPE_STRUCT) {
+ linker_error(prog, "Transform feedback of varying structs not "
+ "implemented yet.");
+ return NULL;
+ }
return var;
+ }
/* From GL_EXT_transform_feedback:
* A program will fail to link if: