diff options
author | Dave Airlie <[email protected]> | 2011-04-24 20:20:55 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2011-04-24 20:35:06 +1000 |
commit | 0a9cec3475fb14be8aa5fa66557d338556cd8ed5 (patch) | |
tree | ff3cda204890efa2faab7fdc291059ace6f4997d /src/gallium | |
parent | 0b3122cfcb26e195f14470d8ea6e3cce240c2f79 (diff) |
r600g: fix glean clipflat test.
the provoking vertex doesn't apply to quad/strip/polygon.
This fixes clipFlat on r600g.
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe.h | 1 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_state_common.c | 10 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h index 88aff0e81bb..40987a0e2de 100644 --- a/src/gallium/drivers/r600/r600_pipe.h +++ b/src/gallium/drivers/r600/r600_pipe.h @@ -241,7 +241,6 @@ int r600_find_vs_semantic_index(struct r600_shader *vs, /* r600_state.c */ void r600_init_state_functions(struct r600_pipe_context *rctx); -void r600_spi_update(struct r600_pipe_context *rctx); void r600_init_config(struct r600_pipe_context *rctx); void r600_pipe_shader_ps(struct pipe_context *ctx, struct r600_pipe_shader *shader); void r600_pipe_shader_vs(struct pipe_context *ctx, struct r600_pipe_shader *shader); diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c index 997c9a597ee..2f1068a0631 100644 --- a/src/gallium/drivers/r600/r600_state_common.c +++ b/src/gallium/drivers/r600/r600_state_common.c @@ -277,7 +277,7 @@ void r600_delete_vs_shader(struct pipe_context *ctx, void *state) } /* FIXME optimize away spi update when it's not needed */ -void r600_spi_update(struct r600_pipe_context *rctx) +static void r600_spi_update(struct r600_pipe_context *rctx, unsigned prim) { struct r600_pipe_shader *shader = rctx->ps_shader; struct r600_pipe_state rstate; @@ -309,6 +309,12 @@ void r600_spi_update(struct r600_pipe_context *rctx) r600_pipe_state_add_reg(&rstate, R_028644_SPI_PS_INPUT_CNTL_0 + i * 4, tmp, 0xFFFFFFFF, NULL); } + + if (prim == PIPE_PRIM_QUADS || prim == PIPE_PRIM_QUAD_STRIP || prim == PIPE_PRIM_POLYGON) { + r600_pipe_state_add_reg(&rstate, R_028814_PA_SU_SC_MODE_CNTL, + S_028814_PROVOKING_VTX_LAST(1), + S_028814_PROVOKING_VTX_LAST(1), NULL); + } r600_context_pipe_state_set(&rctx->ctx, &rstate); } @@ -508,7 +514,7 @@ void r600_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info) return; } - r600_spi_update(rctx); + r600_spi_update(rctx, draw.info.mode); mask = 0; for (int i = 0; i < rctx->framebuffer.nr_cbufs; i++) { |