[Mesa-dev] [PATCH 16/17] mesa/st: don't adjust indirect index for builtins
Timothy Arceri
tarceri at itsqueeze.com
Sun Jun 25 01:31:48 UTC 2017
These seems to be handled differently by the backend and are not
packed with this series anyway.
---
src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 111e5d2..0d62d98 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -2886,21 +2886,22 @@ glsl_to_tgsi_visitor::visit(ir_dereference_array *ir)
} else {
index_reg = get_temp(native_integers ?
glsl_type::int_type : glsl_type::float_type);
emit_asm(ir, TGSI_OPCODE_MUL, st_dst_reg(index_reg),
this->result, st_src_reg_for_type(index_reg.type, element_size));
}
ir_variable *var = ir->array->variable_referenced();
if (ctx->Const.PackedDriverUniformStorage &&
- var && var->data.mode == ir_var_uniform) {
+ var && var->data.mode == ir_var_uniform &&
+ strncmp(var->name, "gl_", 3) != 0) {
unsigned comps = ir->type->without_array()->vector_elements;
/* FIXME: This will only works if the struct has a single member.
* Even the non-packed path has this bug so this is enough to stop
* piglit regressions for now.
*/
comps = ir->type->is_record() ?
ir->type->fields.structure[0].type->without_array()->vector_elements :
comps;
--
2.9.4
More information about the mesa-dev
mailing list