summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_shader.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2014-01-29 00:17:15 +0000
committerDave Airlie <[email protected]>2014-02-05 10:49:42 +1000
commit7ec5e883f20a7ed88c23a98c4be8d4a4ea06e81e (patch)
treed2bc36e36ff596dc5c031ff8acb6c07a340508b1 /src/gallium/drivers/r600/r600_shader.c
parent7863611de3305208effe96fbbef5eaf49b60c904 (diff)
r600g: fix up shader out misc stuff for copy shader
set the correct values so the misc out register is setup correctly for the copy shader. This also updates the state for the gs copy shader so the hw gets programmed correctly. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_shader.c')
-rw-r--r--src/gallium/drivers/r600/r600_shader.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c
index 0a9f55a94a0..3535a134715 100644
--- a/src/gallium/drivers/r600/r600_shader.c
+++ b/src/gallium/drivers/r600/r600_shader.c
@@ -1162,7 +1162,7 @@ static int generate_gs_copy_shader(struct r600_context *rctx,
struct r600_bytecode_output output;
struct r600_bytecode_cf *cf_jump, *cf_pop,
*last_exp_pos = NULL, *last_exp_param = NULL;
- int i, next_clip_pos = 62, next_param = 0;
+ int i, next_clip_pos = 61, next_param = 0;
cshader = calloc(1, sizeof(struct r600_pipe_shader));
if (!cshader)
@@ -1263,18 +1263,26 @@ static int generate_gs_copy_shader(struct r600_context *rctx,
case TGSI_SEMANTIC_PSIZE:
output.array_base = 61;
+ if (next_clip_pos == 61)
+ next_clip_pos = 62;
output.type = V_SQ_CF_ALLOC_EXPORT_WORD0_SQ_EXPORT_POS;
output.swizzle_y = 7;
output.swizzle_z = 7;
output.swizzle_w = 7;
+ ctx.shader->vs_out_misc_write = 1;
+ ctx.shader->vs_out_point_size = 1;
break;
case TGSI_SEMANTIC_LAYER:
output.array_base = 61;
+ if (next_clip_pos == 61)
+ next_clip_pos = 62;
output.type = V_SQ_CF_ALLOC_EXPORT_WORD0_SQ_EXPORT_POS;
output.swizzle_x = 7;
output.swizzle_y = 7;
output.swizzle_z = 0;
output.swizzle_w = 7;
+ ctx.shader->vs_out_misc_write = 1;
+ ctx.shader->vs_out_layer = 1;
break;
case TGSI_SEMANTIC_CLIPDIST:
/* spi_sid is 0 for clipdistance outputs that were generated