radeonsi: enable SPIR-V and GL 4.6 for NIR
authorMarek Olšák <marek.olsak@amd.com>
Wed, 6 Nov 2019 23:03:30 +0000 (18:03 -0500)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 28 Nov 2019 00:28:35 +0000 (19:28 -0500)
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
src/gallium/drivers/radeonsi/si_get.c

index 8dc13ee08b2ba52e72c23a3793d81be1f0a18673..4b63d6b75225300f10e2899c58bf1142d9da78df 100644 (file)
@@ -193,9 +193,9 @@ static int si_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
 
        case PIPE_CAP_GLSL_FEATURE_LEVEL:
        case PIPE_CAP_GLSL_FEATURE_LEVEL_COMPATIBILITY:
-               if (sscreen->info.has_indirect_compute_dispatch)
-                               return 450;
-               return 420;
+               if (!sscreen->info.has_indirect_compute_dispatch)
+                       return 420;
+               return sscreen->options.enable_nir ? 460 : 450;
 
        case PIPE_CAP_MAX_TEXTURE_UPLOAD_MEMORY_BUDGET:
                /* Optimal number for good TexSubImage performance on Polaris10. */
@@ -216,9 +216,8 @@ static int si_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
 
        case PIPE_CAP_PACKED_UNIFORMS:
        case PIPE_CAP_SHADER_SAMPLES_IDENTICAL:
-               if (sscreen->options.enable_nir)
-                       return 1;
-               return 0;
+       case PIPE_CAP_GL_SPIRV:
+               return sscreen->options.enable_nir;
 
        case PIPE_CAP_PREFER_IMM_ARRAYS_AS_CONSTBUF:
                if (sscreen->options.enable_nir)