radeonsi: Set PIPE_SHADER_CAP_MAX_SHADER_IMAGES
authorEdward O'Callaghan <eocallaghan@alterapraxis.com>
Sun, 10 Jan 2016 13:50:32 +0000 (00:50 +1100)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Mon, 21 Mar 2016 20:34:26 +0000 (15:34 -0500)
This enables ARB_shader_image_load_store and ARB_shader_image_size.

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
[allow the same number of images for all shader stages and require LLVM 3.9]

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_pipe.c

index 042cfc764fd201b769f62887ae8e40bc4482472c..dd1103eed062423f0b96e98f7e5a805965e63a7f 100644 (file)
@@ -538,8 +538,9 @@ static int si_get_shader_param(struct pipe_screen* pscreen, unsigned shader, enu
        case PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT:
                return 32;
        case PIPE_SHADER_CAP_MAX_SHADER_BUFFERS:
-       case PIPE_SHADER_CAP_MAX_SHADER_IMAGES:
                return 0;
+       case PIPE_SHADER_CAP_MAX_SHADER_IMAGES:
+               return HAVE_LLVM >= 0x0309 ? SI_NUM_IMAGES : 0;
        }
        return 0;
 }