r600: enable ARB_shader_image_load_store, ARB_shader_image_size
authorDave Airlie <airlied@redhat.com>
Wed, 15 Nov 2017 00:04:11 +0000 (10:04 +1000)
committerDave Airlie <airlied@redhat.com>
Fri, 17 Nov 2017 01:31:41 +0000 (11:31 +1000)
This also enables GL4.2 for gpus with hw fp64 (cayman, cypress)

Tested-By: Gert Wollny <gw.fossdev@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/r600/r600_pipe.c

index 96017dc04770e2be06dd7c0706ca4c923d055b60..a232ee46a866ce89318b23823e8c16215ef1c9da 100644 (file)
@@ -332,7 +332,7 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
 
        case PIPE_CAP_GLSL_FEATURE_LEVEL:
                if (family >= CHIP_CEDAR)
-                  return 410;
+                  return 420;
                /* pre-evergreen geom shaders need newer kernel */
                if (rscreen->b.info.drm_minor >= 37)
                   return 330;
@@ -362,6 +362,9 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
        case PIPE_CAP_BUFFER_SAMPLER_VIEW_RGBA_ONLY:
                return family >= CHIP_CEDAR ? 0 : 1;
 
+       case PIPE_CAP_MAX_COMBINED_SHADER_OUTPUT_RESOURCES:
+               return 8;
+
        /* Unsupported features. */
        case PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT:
        case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER:
@@ -409,7 +412,6 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
        case PIPE_CAP_LOAD_CONSTBUF:
        case PIPE_CAP_TGSI_ANY_REG_AS_ADDRESS:
        case PIPE_CAP_TILE_RASTER_ORDER:
-       case PIPE_CAP_MAX_COMBINED_SHADER_OUTPUT_RESOURCES:
        case PIPE_CAP_SIGNED_VERTEX_BUFFER_OFFSET:
                return 0;
 
@@ -607,10 +609,14 @@ static int r600_get_shader_param(struct pipe_screen* pscreen,
        case PIPE_SHADER_CAP_TGSI_DFRACEXP_DLDEXP_SUPPORTED:
        case PIPE_SHADER_CAP_TGSI_LDEXP_SUPPORTED:
        case PIPE_SHADER_CAP_MAX_SHADER_BUFFERS:
-       case PIPE_SHADER_CAP_MAX_SHADER_IMAGES:
        case PIPE_SHADER_CAP_LOWER_IF_THRESHOLD:
        case PIPE_SHADER_CAP_TGSI_SKIP_MERGE_REGISTERS:
                return 0;
+       case PIPE_SHADER_CAP_MAX_SHADER_IMAGES:
+               if (rscreen->b.family >= CHIP_CEDAR &&
+                   (shader == PIPE_SHADER_FRAGMENT))
+                   return 8;
+               return 0;
        case PIPE_SHADER_CAP_MAX_HW_ATOMIC_COUNTERS:
                if (rscreen->b.family >= CHIP_CEDAR && rscreen->has_atomics)
                        return 8;