vc4: Mark threaded FSes as non-singlethread in the CL.
authorEric Anholt <eric@anholt.net>
Fri, 11 Nov 2016 01:50:34 +0000 (17:50 -0800)
committerEric Anholt <eric@anholt.net>
Sun, 13 Nov 2016 03:21:46 +0000 (19:21 -0800)
src/gallium/drivers/vc4/vc4_context.h
src/gallium/drivers/vc4/vc4_draw.c
src/gallium/drivers/vc4/vc4_program.c

index 3a8ae827b8573598ad892c163568c6b27a11cdfd..db9e82d2a229e50a7ebb480fbd34431dde6b7852 100644 (file)
@@ -163,6 +163,8 @@ struct vc4_compiled_shader {
          */
         bool failed;
 
+        bool fs_threaded;
+
         uint8_t num_inputs;
 
         /* Byte offsets for the start of the vertex attributes 0-7, and the
index c5afc0cdae118eb57bfa71aa841c9a676b624cbb..13db9daeb9ed2d478b18c26a843870b26981aabb 100644 (file)
@@ -155,7 +155,8 @@ vc4_emit_gl_shader_state(struct vc4_context *vc4,
         /* VC4_DIRTY_PRIM_MODE | VC4_DIRTY_RASTERIZER */
         cl_u16(&shader_rec,
                VC4_SHADER_FLAG_ENABLE_CLIPPING |
-               VC4_SHADER_FLAG_FS_SINGLE_THREAD |
+               (vc4->prog.fs->fs_threaded ?
+                0 : VC4_SHADER_FLAG_FS_SINGLE_THREAD) |
                ((info->mode == PIPE_PRIM_POINTS &&
                  vc4->rasterizer->base.point_size_per_vertex) ?
                 VC4_SHADER_FLAG_VS_POINT_SIZE : 0));
index d2281ce6bd3ccc4d434cc61f2a72f5c894009442..3c30f8c477fa6c10e50f8ae1f29d84e06aebd094 100644 (file)
@@ -2543,6 +2543,8 @@ vc4_get_compiled_shader(struct vc4_context *vc4, enum qstage stage,
                                                  sizeof(uint64_t));
         }
 
+        shader->fs_threaded = c->fs_threaded;
+
         /* Copy the compiler UBO range state to the compiled shader, dropping
          * out arrays that were never referenced by an indirect load.
          *