summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/tgsi
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2016-04-26 09:48:46 +1000
committerDave Airlie <airlied@redhat.com>2016-04-27 08:26:53 +1000
commit912ed84f83381330f0d616678878935cd2366293 (patch)
tree85168c308604567b63518e07bf275d1c223e29ee /src/gallium/auxiliary/tgsi
parent9013d9267ce11efc9b841816630b34cbe8820d1d (diff)
downloadexternal_mesa3d-912ed84f83381330f0d616678878935cd2366293.zip
external_mesa3d-912ed84f83381330f0d616678878935cd2366293.tar.gz
external_mesa3d-912ed84f83381330f0d616678878935cd2366293.tar.bz2
tgsi: move to using vector for system values.
For compute support some of the system values are .xyz types, so move to using a vector instead of a single channel. [airlied: squash swizzle fix from compute series]. Reviewed-by: Brian Paul <brianp@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/gallium/auxiliary/tgsi')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_exec.c2
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_exec.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c
index e8bb103..f6b08bc 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_exec.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c
@@ -1282,7 +1282,7 @@ fetch_src_file_channel(const struct tgsi_exec_machine *mach,
* gl_FragCoord, for example, in a sys value register.
*/
for (i = 0; i < TGSI_QUAD_SIZE; i++) {
- chan->u[i] = mach->SystemValue[index->i[i]].u[i];
+ chan->u[i] = mach->SystemValue[index->i[i]].xyzw[swizzle].u[i];
}
break;
diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.h b/src/gallium/auxiliary/tgsi/tgsi_exec.h
index 5e554d5..b12f7be 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_exec.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_exec.h
@@ -356,7 +356,7 @@ struct tgsi_exec_machine
/* System values */
unsigned SysSemanticToIndex[TGSI_SEMANTIC_COUNT];
- union tgsi_exec_channel SystemValue[TGSI_MAX_MISC_INPUTS];
+ struct tgsi_exec_vector SystemValue[TGSI_MAX_MISC_INPUTS];
struct tgsi_exec_vector *Addrs;
struct tgsi_exec_vector *Predicates;