[Mesa-dev] [PATCH 8/9] glsl: simplify validate_intrastage_arrays
Nicolai Hähnle
nhaehnle at gmail.com
Mon May 15 09:27:32 UTC 2017
From: Nicolai Hähnle <nicolai.haehnle at amd.com>
Struct types are now equal when they are structurally equal.
---
src/compiler/glsl/linker.cpp | 8 --------
1 file changed, 8 deletions(-)
diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index 20465db..adfa3b7 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -843,28 +843,20 @@ validate_intrastage_arrays(struct gl_shader_program *prog,
!existing->data.from_ssbo_unsized_array) {
linker_error(prog, "%s `%s' declared as type "
"`%s' but outermost dimension has an index"
" of `%i'\n",
mode_string(var),
var->name, existing->type->name,
var->data.max_array_access);
}
return true;
}
- } else {
- /* The arrays of structs could have different glsl_type pointers but
- * they are actually the same type. Use record_compare() to check that.
- */
- if (existing->type->fields.array->is_record() &&
- var->type->fields.array->is_record() &&
- existing->type->fields.array->record_compare(var->type->fields.array))
- return true;
}
}
return false;
}
/**
* Perform validation of global variables used across multiple shaders
*/
void
--
2.9.3
More information about the mesa-dev
mailing list