diff options
author | Paul Berry <stereotype441@gmail.com> | 2013-08-18 08:23:51 -0700 |
---|---|---|
committer | Paul Berry <stereotype441@gmail.com> | 2013-08-31 17:11:59 -0700 |
commit | 555f9cf46d2108d1f9cdb52c112e5568f2a2ee2e (patch) | |
tree | 60141db0cb67c4ac73ea21a3753a8a01c8e53570 /src/mesa/drivers/dri/i965/gen6_vs_state.c | |
parent | 27eecefc670c8b9e75f8520df7c9c7846923bf20 (diff) | |
download | external_mesa3d-555f9cf46d2108d1f9cdb52c112e5568f2a2ee2e.zip external_mesa3d-555f9cf46d2108d1f9cdb52c112e5568f2a2ee2e.tar.gz external_mesa3d-555f9cf46d2108d1f9cdb52c112e5568f2a2ee2e.tar.bz2 |
i965: Make sure constants re-sent after constant buffer reallocation.
The hardware requires that after constant buffers for a stage are
allocated using a 3DSTATE_PUSH_CONSTANT_ALLOC_{VS,HS,DS,GS,PS}
command, and prior to execution of a 3DPRIMITIVE, the corresponding
stage's constant buffers must be reprogrammed using a
3DSTATE_CONSTANT_{VS,HS,DS,GS,PS} command.
Previously we didn't need to worry about this, because we only
programmed 3DSTATE_PUSH_CONSTANT_ALLOC_{VS,HS,DS,GS,PS} once on
startup (or, previous to that, whenever BRW_NEW_CONTEXT was flagged).
But now that we reallocate the constant buffers whenever geometry
shaders are switched on and off, we need to make sure the constant
buffers are reprogrammed.
We do this by adding a new bit, BRW_NEW_PUSH_CONSTANT_ALLOCATION, to
brw->state.dirty.brw.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src/mesa/drivers/dri/i965/gen6_vs_state.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/gen6_vs_state.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/gen6_vs_state.c b/src/mesa/drivers/dri/i965/gen6_vs_state.c index 0342a22..98c7aec 100644 --- a/src/mesa/drivers/dri/i965/gen6_vs_state.c +++ b/src/mesa/drivers/dri/i965/gen6_vs_state.c @@ -206,7 +206,8 @@ const struct brw_tracked_state gen6_vs_state = { .mesa = _NEW_TRANSFORM | _NEW_PROGRAM_CONSTANTS, .brw = (BRW_NEW_CONTEXT | BRW_NEW_VERTEX_PROGRAM | - BRW_NEW_BATCH), + BRW_NEW_BATCH | + BRW_NEW_PUSH_CONSTANT_ALLOCATION), .cache = CACHE_NEW_VS_PROG | CACHE_NEW_SAMPLER }, .emit = upload_vs_state, |