mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 15:58:05 +02:00
nv30: reset fragprog bufctx at bind time
A clear will do a partial validate, which will in turn reference all the buffers in the bufctx again. However the fragprog last validated might have already been deleted. So reset the bufctx when updating state. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
This commit is contained in:
parent
b875198f1f
commit
bad107f2ec
1 changed files with 8 additions and 1 deletions
|
|
@ -165,8 +165,15 @@ static void
|
|||
nv30_fp_state_bind(struct pipe_context *pipe, void *hwcso)
|
||||
{
|
||||
struct nv30_context *nv30 = nv30_context(pipe);
|
||||
struct nv30_fragprog *fp = hwcso;
|
||||
|
||||
nv30->fragprog.program = hwcso;
|
||||
/* reset the bucftx so that we don't keep a dangling reference to the fp
|
||||
* code
|
||||
*/
|
||||
if (fp != nv30->state.fragprog)
|
||||
PUSH_RESET(nv30->base.pushbuf, BUFCTX_FRAGPROG);
|
||||
|
||||
nv30->fragprog.program = fp;
|
||||
nv30->dirty |= NV30_NEW_FRAGPROG;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue