Mesa (master): nv30: fix rare issue with fp unbinding not finding the bufctx

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Dec 31 05:49:21 UTC 2018


Module: Mesa
Branch: master
Commit: b34cfd474961bef6cb245e02a6dba7db0cf12ce6
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b34cfd474961bef6cb245e02a6dba7db0cf12ce6

Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date:   Wed Dec 26 23:01:21 2018 -0500

nv30: fix rare issue with fp unbinding not finding the bufctx

If the last-active context gets deleted, the pushbuf doesn't have a
bufctx to reference. Then there could be a sequence of binds which would
trigger a reset on that bin before validation was done. Instead we just
pass in the bufctx in question directly.

All other instances of PUSH_RESET happen strictly after a validation is
run.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102349
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>

---

 src/gallium/drivers/nouveau/nv30/nv30_fragprog.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/nouveau/nv30/nv30_fragprog.c b/src/gallium/drivers/nouveau/nv30/nv30_fragprog.c
index 6de61bcc1c..073b2a3467 100644
--- a/src/gallium/drivers/nouveau/nv30/nv30_fragprog.c
+++ b/src/gallium/drivers/nouveau/nv30/nv30_fragprog.c
@@ -171,7 +171,7 @@ nv30_fp_state_bind(struct pipe_context *pipe, void *hwcso)
     * code
     */
    if (fp != nv30->state.fragprog)
-      PUSH_RESET(nv30->base.pushbuf, BUFCTX_FRAGPROG);
+      nouveau_bufctx_reset(nv30->bufctx, BUFCTX_FRAGPROG);
 
    nv30->fragprog.program = fp;
    nv30->dirty |= NV30_NEW_FRAGPROG;




More information about the mesa-commit mailing list