mesa/st: enable compute shaders if images are also supported
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Sat, 2 Apr 2016 11:39:54 +0000 (13:39 +0200)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tue, 19 Apr 2016 16:10:32 +0000 (18:10 +0200)
v2: Also depend on atomic counters.

Signed-off-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/mesa/state_tracker/st_extensions.c

index 6d407d33eff6e0957724deff68a979695cc3eefd..939f15d5e9fca60325fed0c5953424a7e865b765 100644 (file)
@@ -1168,9 +1168,10 @@ void st_init_extensions(struct pipe_screen *screen,
             consts->MaxComputeWorkGroupCount[i] = grid_size[i];
             consts->MaxComputeWorkGroupSize[i] = block_size[i];
          }
-         /* XXX: ARB_compute_shader is not enabled by default because images
-          * support is still not implemented yet. */
-         /* extensions->ARB_compute_shader = true; */
+
+         extensions->ARB_compute_shader =
+                                      extensions->ARB_shader_image_load_store &&
+                                      extensions->ARB_shader_atomic_counters;
       }
    }
 }