radeonsi: gate PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT by LLVM version
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 13 Apr 2016 14:11:44 +0000 (09:11 -0500)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 13 Apr 2016 15:06:22 +0000 (10:06 -0500)
Otherwise we incorrectly claim ARB_ssbo support even with older LLVM versions.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94917
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_pipe.c

index 1dd733819f12a541e4f94551d17bbc8940c3fc59..6a990ed64c3d142c59781b2ea93385c0a2f224ea 100644 (file)
@@ -331,9 +331,10 @@ static int si_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
 
        case PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENT:
        case PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT:
-       case PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT:
        case PIPE_CAP_MAX_TEXTURE_GATHER_COMPONENTS:
                return 4;
+       case PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT:
+               return HAVE_LLVM >= 0x0309 ? 4 : 0;
 
        case PIPE_CAP_GLSL_FEATURE_LEVEL:
                return HAVE_LLVM >= 0x0309 ? 420 :