[Mesa-dev] [PATCH 2/2] glsl_to_tgsi: avoid creating arrays if driver doesn't support them
Christian König
deathsimple at vodafone.de
Mon Mar 25 06:11:14 PDT 2013
From: Christian König <christian.koenig at amd.com>
Avoid creating arrays if we replace indirect addressing anyway.
Signed-off-by: Christian König <christian.koenig at amd.com>
---
src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 4 +++-
1 file changed, 3 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 0885564..e728f79 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -1009,7 +1009,9 @@ glsl_to_tgsi_visitor::get_temp(const glsl_type *type)
src.reladdr = NULL;
src.negate = 0;
- if (type->is_array() || type->is_matrix()) {
+ if (!options->EmitNoIndirectTemp &&
+ (type->is_array() || type->is_matrix())) {
+
src.file = PROGRAM_ARRAY;
src.index = next_array << 16 | 0x8000;
array_sizes[next_array] = type_size(type);
--
1.7.9.5
More information about the mesa-dev
mailing list