summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_state.c
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2012-09-06 18:03:38 +0200
committerMichel Dänzer <[email protected]>2012-10-26 15:51:17 +0200
commit691f08dbeaeb71bfa26784e7ec18aa07e34893fb (patch)
tree4e940541fbad34bca90ed9880f2fe110289a338f /src/gallium/drivers/radeonsi/si_state.c
parent44ef033c25ee0dde97a2339d4439560885d52cad (diff)
radeonsi: Handle TGSI_SEMANTIC_BCOLOR.
Put the back face colour right after the front face colour in the LDS parameter space. Fixes 18 piglit tests related to two sided lighting. Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Tom Stellard <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_state.c')
-rw-r--r--src/gallium/drivers/radeonsi/si_state.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index 20f4be3d8f2..66f0bd886fe 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -379,6 +379,8 @@ static void *si_create_rs_state(struct pipe_context *ctx,
return NULL;
}
+ rs->two_side = state->light_twoside;
+
polygon_dual_mode = (state->fill_front != PIPE_POLYGON_MODE_FILL ||
state->fill_back != PIPE_POLYGON_MODE_FILL);
@@ -1841,9 +1843,10 @@ static INLINE struct si_shader_key si_shader_selector_key(struct pipe_context *c
if (sel->fs_write_all)
key.nr_cbufs = rctx->framebuffer.nr_cbufs;
key.export_16bpc = rctx->export_16bpc;
- /*if (rctx->queued.named.rasterizer)
- key.flatshade = rctx->queued.named.rasterizer->flatshade;*/
- /*key.color_two_side |== rctx->two_side;*/
+ if (rctx->queued.named.rasterizer) {
+ key.color_two_side = rctx->queued.named.rasterizer->two_side;
+ /*key.flatshade = rctx->queued.named.rasterizer->flatshade;*/
+ }
}
return key;