vc4: Mark our shaders as single-threaded.
authorEric Anholt <eric@anholt.net>
Wed, 29 Jul 2015 19:16:50 +0000 (12:16 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 30 Jul 2015 22:46:28 +0000 (15:46 -0700)
I had my understanding of this bit flipped.  We're using the full register
space, so we need to say so.

src/gallium/drivers/vc4/kernel/vc4_validate.c
src/gallium/drivers/vc4/vc4_draw.c

index 674ca63786471d34ead83ce6071075664cd851d0..b248831113cb2a0526cab235b7f9d8a7974774d2 100644 (file)
@@ -780,6 +780,11 @@ validate_gl_shader_rec(struct drm_device *dev,
        exec->shader_rec_v += roundup(packet_size, 16);
        exec->shader_rec_size -= packet_size;
 
+       if (!(*(uint16_t *)pkt_u & VC4_SHADER_FLAG_FS_SINGLE_THREAD)) {
+               DRM_ERROR("Multi-threaded fragment shaders not supported.\n");
+               return -EINVAL;
+       }
+
        for (i = 0; i < shader_reloc_count; i++) {
                if (src_handles[i] > exec->bo_count) {
                        DRM_ERROR("Shader handle %d too big\n", src_handles[i]);
index 22ae8f27e4a47cdb5e6100e113db60cfe150bd2b..a4e5e092b1a6832b3251bda0b1cc553a5e35c820 100644 (file)
@@ -139,6 +139,7 @@ vc4_emit_gl_shader_state(struct vc4_context *vc4, const struct pipe_draw_info *i
         /* VC4_DIRTY_PRIM_MODE | VC4_DIRTY_RASTERIZER */
         cl_u16(&shader_rec,
                VC4_SHADER_FLAG_ENABLE_CLIPPING |
+               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));