diff options
author | Samuel Pitoiset <[email protected]> | 2016-01-11 15:35:21 +0100 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2016-02-21 10:41:25 +0100 |
commit | 57d4251003f4ed284179171bebaa2463675440d6 (patch) | |
tree | df94d3601eb519ce0ef188abcfc97edb25ecc0a5 /src/gallium/drivers/nouveau/nvc0/nvc0_state.c | |
parent | 53f92bb7f903cc82dc1b1851bb7da3ee8469ab4a (diff) |
nvc0: bind constant buffers for compute on Fermi
Loosely based on 3D.
Changs from v3:
- invalidate COMPUTE CBs after validating 3D CBs because they are
aliased
Changes from v2:
- get rid of the 's' param to nvc0_cb_bo_push() because it doesn't
matter to upload constbufs for compute using the 3d chan
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau/nvc0/nvc0_state.c')
-rw-r--r-- | src/gallium/drivers/nouveau/nvc0/nvc0_state.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_state.c b/src/gallium/drivers/nouveau/nvc0/nvc0_state.c index 448211fca14..157d628d849 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_state.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_state.c @@ -839,7 +839,9 @@ nvc0_set_constant_buffer(struct pipe_context *pipe, uint shader, uint index, const unsigned i = index; if (unlikely(shader == PIPE_SHADER_COMPUTE)) { - assert(!cb || !cb->user_buffer); + if (nvc0->constbuf[s][i].user) + nvc0->constbuf[s][i].u.buf = NULL; + else if (nvc0->constbuf[s][i].u.buf) nouveau_bufctx_reset(nvc0->bufctx_cp, NVC0_BIND_CP_CB(i)); |