summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/ir_set_program_inouts.cpp
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2015-10-28 16:39:11 -0700
committerKenneth Graunke <kenneth@whitecape.org>2016-08-07 23:51:21 -0700
commit4a49851da140fedf0e133034a202570725ad03a9 (patch)
tree46b068df8879d9a09060e5531f6d8052e7a40544 /src/compiler/glsl/ir_set_program_inouts.cpp
parent86915b495b2fefa671750b24eda0225000ccbb9e (diff)
downloadexternal_mesa3d-4a49851da140fedf0e133034a202570725ad03a9.zip
external_mesa3d-4a49851da140fedf0e133034a202570725ad03a9.tar.gz
external_mesa3d-4a49851da140fedf0e133034a202570725ad03a9.tar.bz2
glsl: Delete bogus ir_set_program_inouts assert.
This assertion is bogus. Varying structs, and arrays of structs, are allowed by GLSL, and we can see them here. While we currently don't have any partial-variable support for those, simply returning false and marking the entire thing as used is certainly legitimate. I believe this is often swept under the rug by varying packing, but that's disabled in certain tessellation situations. Hit by 20 dEQP-GLES31.functional.tessellation.user_defined_io.* tests. Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Diffstat (limited to 'src/compiler/glsl/ir_set_program_inouts.cpp')
-rw-r--r--src/compiler/glsl/ir_set_program_inouts.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/compiler/glsl/ir_set_program_inouts.cpp b/src/compiler/glsl/ir_set_program_inouts.cpp
index 7c61994..060bea8 100644
--- a/src/compiler/glsl/ir_set_program_inouts.cpp
+++ b/src/compiler/glsl/ir_set_program_inouts.cpp
@@ -260,15 +260,19 @@ ir_set_program_inouts_visitor::try_mark_partial_variable(ir_variable *var,
* lowering passes (do_vec_index_to_swizzle() gets rid of indexing into
* vectors, and lower_packed_varyings() gets rid of structs that occur in
* varyings).
+ *
+ * However, we don't use varying packing in all cases - tessellation
+ * shaders bypass it. This means we'll see varying structs and arrays
+ * of structs here. For now, we just give up so the caller marks the
+ * entire variable as used.
*/
if (!(type->is_matrix() ||
(type->is_array() &&
(type->fields.array->is_numeric() ||
type->fields.array->is_boolean())))) {
- assert(!"Unexpected indexing in ir_set_program_inouts");
- /* For safety in release builds, in case we ever encounter unexpected
- * indexing, give up and let the caller mark the whole variable as used.
+ /* If we don't know how to handle this case, give up and let the
+ * caller mark the whole variable as used.
*/
return false;
}