[Mesa-dev] [PATCH v2 19/20] mesa/st: enable compute shaders if images are also supported

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Wed Apr 13 19:30:03 UTC 2016


v2: Also depend on atomic counters.

Signed-off-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
---
 src/mesa/state_tracker/st_extensions.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index 6d407d3..939f15d 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -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;
       }
    }
 }
-- 
2.8.0



More information about the mesa-dev mailing list