diff options
author | Dave Airlie <[email protected]> | 2016-04-26 09:48:46 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2016-04-27 08:26:53 +1000 |
commit | 912ed84f83381330f0d616678878935cd2366293 (patch) | |
tree | 85168c308604567b63518e07bf275d1c223e29ee /src/gallium/auxiliary/draw/draw_vs_exec.c | |
parent | 9013d9267ce11efc9b841816630b34cbe8820d1d (diff) |
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 <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_vs_exec.c')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_vs_exec.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/draw/draw_vs_exec.c b/src/gallium/auxiliary/draw/draw_vs_exec.c index da0d1a7f9a8..fe6ad5b33d9 100644 --- a/src/gallium/auxiliary/draw/draw_vs_exec.c +++ b/src/gallium/auxiliary/draw/draw_vs_exec.c @@ -107,7 +107,7 @@ vs_exec_run_linear( struct draw_vertex_shader *shader, unsigned i = machine->SysSemanticToIndex[TGSI_SEMANTIC_INSTANCEID]; assert(i < Elements(machine->SystemValue)); for (j = 0; j < TGSI_QUAD_SIZE; j++) - machine->SystemValue[i].i[j] = shader->draw->instance_id; + machine->SystemValue[i].xyzw[0].i[j] = shader->draw->instance_id; } for (i = 0; i < count; i += MAX_TGSI_VERTICES) { @@ -130,19 +130,19 @@ vs_exec_run_linear( struct draw_vertex_shader *shader, if (shader->info.uses_vertexid) { unsigned vid = machine->SysSemanticToIndex[TGSI_SEMANTIC_VERTEXID]; assert(vid < Elements(machine->SystemValue)); - machine->SystemValue[vid].i[j] = i + j; + machine->SystemValue[vid].xyzw[0].i[j] = i + j; /* XXX this should include base vertex. Where to get it??? */ } if (shader->info.uses_basevertex) { unsigned vid = machine->SysSemanticToIndex[TGSI_SEMANTIC_BASEVERTEX]; assert(vid < Elements(machine->SystemValue)); - machine->SystemValue[vid].i[j] = 0; + machine->SystemValue[vid].xyzw[0].i[j] = 0; /* XXX Where to get it??? */ } if (shader->info.uses_vertexid_nobase) { unsigned vid = machine->SysSemanticToIndex[TGSI_SEMANTIC_VERTEXID_NOBASE]; assert(vid < Elements(machine->SystemValue)); - machine->SystemValue[vid].i[j] = i + j; + machine->SystemValue[vid].xyzw[0].i[j] = i + j; } for (slot = 0; slot < shader->info.num_inputs; slot++) { |