llvmpipe: raise dirty flag on transfers to bound constbuf
authorKeith Whitwell <keithw@vmware.com>
Mon, 29 Nov 2010 19:18:54 +0000 (19:18 +0000)
committerKeith Whitwell <keithw@vmware.com>
Tue, 30 Nov 2010 12:01:29 +0000 (12:01 +0000)
Need this to trigger the scene to update its shadow of the constant
state.

src/gallium/drivers/llvmpipe/lp_texture.c

index a4b9f25..f78cd60 100644 (file)
@@ -49,6 +49,7 @@
 #include "lp_tile_image.h"
 #include "lp_texture.h"
 #include "lp_setup.h"
+#include "lp_state.h"
 
 #include "state_tracker/sw_winsys.h"
 
@@ -566,6 +567,7 @@ llvmpipe_get_transfer(struct pipe_context *pipe,
                      unsigned usage,
                      const struct pipe_box *box)
 {
+   struct llvmpipe_context *llvmpipe = llvmpipe_context(pipe);
    struct llvmpipe_resource *lprex = llvmpipe_resource(resource);
    struct llvmpipe_transfer *lpr;
 
@@ -594,6 +596,9 @@ llvmpipe_get_transfer(struct pipe_context *pipe,
       }
    }
 
+   if (resource == llvmpipe->constants[PIPE_SHADER_FRAGMENT][0])
+      llvmpipe->dirty |= LP_NEW_CONSTANTS;
+
    lpr = CALLOC_STRUCT(llvmpipe_transfer);
    if (lpr) {
       struct pipe_transfer *pt = &lpr->base;