diff options
author | Jerome Glisse <[email protected]> | 2010-09-27 14:58:01 -0400 |
---|---|---|
committer | Jerome Glisse <[email protected]> | 2010-09-27 15:00:17 -0400 |
commit | 1617daaf496573eba70b35a760183b427adeff1b (patch) | |
tree | 580d296cbb39883d1f16bef5fe305ac63019ee9f /src/gallium/drivers | |
parent | 99c422ef5ab3924aad66af026945f491d75d226f (diff) |
r600g: fix pointsprite & resource unbinding
When asking to bind NULL resource assume it's unbinding
so free resource and unreference assoicated buffer.
Also fix pointsprite parameter.
Fix glsl-fs-pointcoord & fp-fragment-position
Signed-off-by: Jerome Glisse <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/r600/evergreen_state.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_state2.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c index 89f7c7f53a4..1553088aa21 100644 --- a/src/gallium/drivers/r600/evergreen_state.c +++ b/src/gallium/drivers/r600/evergreen_state.c @@ -1524,7 +1524,8 @@ void evergreen_pipe_shader_ps(struct pipe_context *ctx, struct r600_pipe_shader } if (rshader->input[i].name == TGSI_SEMANTIC_FACE) have_face = TRUE; - if (rctx->sprite_coord_enable & (1 << i)) { + if (rshader->input[i].name == TGSI_SEMANTIC_GENERIC && + rctx->sprite_coord_enable & (1 << rshader->input[i].sid)) { tmp |= S_028644_PT_SPRITE_TEX(1); } r600_pipe_state_add_reg(rstate, EVERGREEN_GROUP_CONTEXT, R_028644_SPI_PS_INPUT_CNTL_0 + i * 4, tmp, 0xFFFFFFFF, NULL); diff --git a/src/gallium/drivers/r600/r600_state2.c b/src/gallium/drivers/r600/r600_state2.c index 8bf8d24549c..06a6f0d80cc 100644 --- a/src/gallium/drivers/r600/r600_state2.c +++ b/src/gallium/drivers/r600/r600_state2.c @@ -127,7 +127,8 @@ static void r600_pipe_shader_ps(struct pipe_context *ctx, struct r600_pipe_shade } if (rshader->input[i].name == TGSI_SEMANTIC_FACE) have_face = TRUE; - if (rctx->sprite_coord_enable & (1 << i)) { + if (rshader->input[i].name == TGSI_SEMANTIC_GENERIC && + rctx->sprite_coord_enable & (1 << rshader->input[i].sid)) { tmp |= S_028644_PT_SPRITE_TEX(1); } r600_pipe_state_add_reg(rstate, R600_GROUP_CONTEXT, R_028644_SPI_PS_INPUT_CNTL_0 + i * 4, tmp, 0xFFFFFFFF, NULL); |