llvmpipe: introduce new state dirty tracking for compute.
authorDave Airlie <airlied@redhat.com>
Tue, 27 Aug 2019 04:43:33 +0000 (14:43 +1000)
committerDave Airlie <airlied@redhat.com>
Wed, 4 Sep 2019 05:22:20 +0000 (15:22 +1000)
Compute doesn't share dirty state with the fragment pipeline
so create a separate path for it.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/gallium/drivers/llvmpipe/lp_context.h
src/gallium/drivers/llvmpipe/lp_state.h
src/gallium/drivers/llvmpipe/lp_state_cs.c

index f1c2d40f9ebf158cebfc88126f26190d71280eac..1fd0d0a2dea2331f63e84e88bf3e885ea0497c52 100644 (file)
@@ -104,7 +104,7 @@ struct llvmpipe_context {
    unsigned active_occlusion_queries;
 
    unsigned dirty; /**< Mask of LP_NEW_x flags */
-
+   unsigned cs_dirty; /**< Mask of LP_CSNEW_x flags */
    /** Mapped vertex buffers */
    ubyte *mapped_vbuffer[PIPE_MAX_ATTRIBS];
    
index 46885a7e701fe3bf333610bd33ad90fd58b6f4aa..8f22debed41420e7c202d76cf67ae9da338db2ac 100644 (file)
@@ -59,6 +59,7 @@
 #define LP_NEW_FS_SSBOS      0x80000
 #define LP_NEW_FS_IMAGES    0x100000
 
+#define LP_CSNEW_CS 0x1
 
 struct vertex_info;
 struct pipe_context;
index cc515c43075ffa7f3fffe0f236efe346f35fcfc3..0da862626bcfdc7e23e7f074e42cd52d0d017fe7 100644 (file)
@@ -61,6 +61,7 @@ llvmpipe_bind_compute_state(struct pipe_context *pipe,
       return;
 
    llvmpipe->cs = (struct lp_compute_shader *)cs;
+   llvmpipe->cs_dirty |= LP_CSNEW_CS;
 }
 
 /**