swr: Update fs texture & sampler state logic
authorGeorge Kyriazis <george.kyriazis@intel.com>
Tue, 24 Jan 2017 23:19:55 +0000 (17:19 -0600)
committerTim Rowley <timothy.o.rowley@intel.com>
Wed, 25 Jan 2017 16:02:50 +0000 (10:02 -0600)
In swr_update_derived() update texture and sampler state on a new fragment
shader.  GALLIUM_HUD can update fs using a previously bound texture and
sampler.

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
src/gallium/drivers/swr/swr_state.cpp

index 41e03560b178d5352314f21aa6a928765dc0c8a8..f1f4963c259b3fd4b28f8c165d4f8db58215e29a 100644 (file)
@@ -1283,7 +1283,8 @@ swr_update_derived(struct pipe_context *pipe,
       SwrSetPixelShaderState(ctx->swrContext, &psState);
 
       /* JIT sampler state */
-      if (ctx->dirty & SWR_NEW_SAMPLER) {
+      if (ctx->dirty & (SWR_NEW_SAMPLER |
+                        SWR_NEW_FS)) {
          swr_update_sampler_state(ctx,
                                   PIPE_SHADER_FRAGMENT,
                                   key.nr_samplers,
@@ -1291,7 +1292,9 @@ swr_update_derived(struct pipe_context *pipe,
       }
 
       /* JIT sampler view state */
-      if (ctx->dirty & (SWR_NEW_SAMPLER_VIEW | SWR_NEW_FRAMEBUFFER)) {
+      if (ctx->dirty & (SWR_NEW_SAMPLER_VIEW |
+                        SWR_NEW_FRAMEBUFFER |
+                        SWR_NEW_FS)) {
          swr_update_texture_state(ctx,
                                   PIPE_SHADER_FRAGMENT,
                                   key.nr_sampler_views,