diff options
author | Dave Airlie <[email protected]> | 2015-01-27 13:34:50 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2015-01-28 09:51:02 +1000 |
commit | cc2fc095bfae1c0494240e4f06931e2ca90e182c (patch) | |
tree | 9bdfd0625ecc76180217827ba22789882ad84936 /src | |
parent | 5c83a0d2ce41fa4b7b39d13c69d39990f7c926f5 (diff) |
r600g: move selecting the pixel shader earlier.
In order to detect that a pixel shader has a prim id
input when we have no geometry shader we need to reorder
the shader selection so the pixel shader is selected
first, then the vertex shader key can take into account
the primitive id input requirement and lack of geom shader.
Reviewed-by: Glenn Kennard <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/r600/r600_state_common.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c index 09d8952844f..10306207b46 100644 --- a/src/gallium/drivers/r600/r600_state_common.c +++ b/src/gallium/drivers/r600/r600_state_common.c @@ -1170,6 +1170,10 @@ static bool r600_update_derived_state(struct r600_context *rctx) } } + r600_shader_select(ctx, rctx->ps_shader, &ps_dirty); + if (unlikely(!rctx->ps_shader->current)) + return false; + update_gs_block_state(rctx, rctx->gs_shader != NULL); if (rctx->gs_shader) { @@ -1232,9 +1236,6 @@ static bool r600_update_derived_state(struct r600_context *rctx) } } - r600_shader_select(ctx, rctx->ps_shader, &ps_dirty); - if (unlikely(!rctx->ps_shader->current)) - return false; if (unlikely(ps_dirty || rctx->pixel_shader.shader != rctx->ps_shader->current || rctx->rasterizer->sprite_coord_enable != rctx->ps_shader->current->sprite_coord_enable || |