diff options
author | Tilman Sauerbeck <tilman@code-monkey.de> | 2010-09-18 16:42:22 +0200 |
---|---|---|
committer | Tilman Sauerbeck <tilman@code-monkey.de> | 2010-09-19 09:21:41 +0200 |
commit | 8861727c9190c35f7391ad848fefc6a401872007 (patch) | |
tree | 7fdd435ee0af52436237ed3b92d77f00ed8b6100 /src/gallium/drivers/r600/r600_hw_states.c | |
parent | fa1056190897719d9ae7410965abb187392ef520 (diff) |
r600g: Added support for TGSI_SEMANTIC_FACE.
This makes the 'glsl1-gl_FrontFacing var (1)' piglit test pass.
Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
Diffstat (limited to 'src/gallium/drivers/r600/r600_hw_states.c')
-rw-r--r-- | src/gallium/drivers/r600/r600_hw_states.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/r600_hw_states.c b/src/gallium/drivers/r600/r600_hw_states.c index bca78ee8de..25344c6f82 100644 --- a/src/gallium/drivers/r600/r600_hw_states.c +++ b/src/gallium/drivers/r600/r600_hw_states.c @@ -943,7 +943,7 @@ static int r600_ps_shader(struct r600_context *rctx, struct r600_context_state * const struct pipe_rasterizer_state *rasterizer; struct r600_shader *rshader = &rpshader->shader; unsigned i, tmp, exports_ps, num_cout; - boolean have_pos = FALSE; + boolean have_pos = FALSE, have_face = FALSE; rasterizer = &rctx->rasterizer->state.rasterizer; @@ -958,6 +958,10 @@ static int r600_ps_shader(struct r600_context *rctx, struct r600_context_state * rshader->input[i].name == TGSI_SEMANTIC_POSITION) { tmp |= S_028644_FLAT_SHADE(rshader->flat_shade); } + + if (rshader->input[i].name == TGSI_SEMANTIC_FACE) + have_face = TRUE; + if (rasterizer->sprite_coord_enable & (1 << i)) { tmp |= S_028644_PT_SPRITE_TEX(1); } @@ -985,7 +989,10 @@ static int r600_ps_shader(struct r600_context *rctx, struct r600_context_state * S_0286CC_BARYC_SAMPLE_CNTL(1); state->states[R600_PS_SHADER__SPI_INPUT_Z] |= 1; } + state->states[R600_PS_SHADER__SPI_PS_IN_CONTROL_1] = 0x00000000; + state->states[R600_PS_SHADER__SPI_PS_IN_CONTROL_1] |= S_0286D0_FRONT_FACE_ENA(have_face); + state->states[R600_PS_SHADER__SQ_PGM_RESOURCES_PS] = S_028868_NUM_GPRS(rshader->bc.ngpr) | S_028868_STACK_SIZE(rshader->bc.nstack); state->states[R600_PS_SHADER__SQ_PGM_EXPORTS_PS] = exports_ps; |