st/mesa: enable ARB_enhanced_layouts and turn the cap on
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 6 Oct 2016 21:10:22 +0000 (23:10 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 12 Oct 2016 16:50:10 +0000 (18:50 +0200)
v2: mark llvmpipe & softpipe properly as well (Jason Wood)

Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
docs/features.txt
docs/relnotes/12.1.0.html
src/gallium/drivers/llvmpipe/lp_screen.c
src/gallium/drivers/radeonsi/si_pipe.c
src/gallium/drivers/softpipe/sp_screen.c
src/mesa/state_tracker/st_extensions.c

index 505b61cc7ad6bc6a126a5877d5661f2544394104..ec2634f9a717ee375b7c9e15b063bb8e344ffd7d 100644 (file)
@@ -188,23 +188,23 @@ GL 4.3, GLSL 4.30 -- all DONE: i965/gen8+, nvc0, radeonsi
   GL_ARB_vertex_attrib_binding                          DONE (all drivers)
 
 
-GL 4.4, GLSL 4.40 -- all DONE: i965/gen8+
+GL 4.4, GLSL 4.40 -- all DONE: i965/gen8+, radeonsi
 
   GL_MAX_VERTEX_ATTRIB_STRIDE                           DONE (all drivers)
-  GL_ARB_buffer_storage                                 DONE (i965, nv50, nvc0, r600, radeonsi)
-  GL_ARB_clear_texture                                  DONE (i965, nv50, nvc0, r600, radeonsi)
-  GL_ARB_enhanced_layouts                               DONE (i965)
+  GL_ARB_buffer_storage                                 DONE (i965, nv50, nvc0, r600)
+  GL_ARB_clear_texture                                  DONE (i965, nv50, nvc0, r600)
+  GL_ARB_enhanced_layouts                               DONE (i965, llvmpipe, softpipe)
   - compile-time constant expressions                   DONE
   - explicit byte offsets for blocks                    DONE
   - forced alignment within blocks                      DONE
-  - specified vec4-slot component numbers               DONE (i965)
+  - specified vec4-slot component numbers               DONE (i965, llvmpipe, softpipe)
   - specified transform/feedback layout                 DONE
   - input/output block locations                        DONE
   GL_ARB_multi_bind                                     DONE (all drivers)
-  GL_ARB_query_buffer_object                            DONE (i965/hsw+, nvc0, radeonsi)
-  GL_ARB_texture_mirror_clamp_to_edge                   DONE (i965, nv50, nvc0, r600, radeonsi, llvmpipe, softpipe, swr)
-  GL_ARB_texture_stencil8                               DONE (i965/hsw+, nv50, nvc0, r600, radeonsi, llvmpipe, softpipe, swr)
-  GL_ARB_vertex_type_10f_11f_11f_rev                    DONE (i965, nv50, nvc0, r600, radeonsi, llvmpipe, softpipe, swr)
+  GL_ARB_query_buffer_object                            DONE (i965/hsw+, nvc0)
+  GL_ARB_texture_mirror_clamp_to_edge                   DONE (i965, nv50, nvc0, r600, llvmpipe, softpipe, swr)
+  GL_ARB_texture_stencil8                               DONE (i965/hsw+, nv50, nvc0, r600, llvmpipe, softpipe, swr)
+  GL_ARB_vertex_type_10f_11f_11f_rev                    DONE (i965, nv50, nvc0, r600, llvmpipe, softpipe, swr)
 
 GL 4.5, GLSL 4.50:
 
index 2e4b669d8baed23568290ddd6a059cbe91598ff2..20fd2cbe91704caffe2b47a56f7c5354346bfec4 100644 (file)
@@ -51,7 +51,7 @@ Note: some of the new features are only available with certain drivers.
 <li>GL_ARB_clear_texture on r600, radeonsi</li>
 <li>GL_ARB_compute_variable_group_size on nvc0, radeonsi</li>
 <li>GL_ARB_cull_distance on radeonsi</li>
-<li>GL_ARB_enhanced_layouts on i965</li>
+<li>GL_ARB_enhanced_layouts on i965, radeonsi, llvmpipe, softpipe</li>
 <li>GL_ARB_indirect_parameters on radeonsi</li>
 <li>GL_ARB_query_buffer_object on radeonsi</li>
 <li>GL_ARB_shader_draw_parameters on radeonsi</li>
index 8da942865f45267a07015132bf5f0d4fc40b719e..3e4f1ef44478008c3e62800e21b59fe1e546ac61 100644 (file)
@@ -265,6 +265,7 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_FAKE_SW_MSAA:
       return 1;
    case PIPE_CAP_CONDITIONAL_RENDER_INVERTED:
+   case PIPE_CAP_TGSI_ARRAY_COMPONENTS:
       return 1;
 
    case PIPE_CAP_VENDOR_ID:
@@ -336,7 +337,6 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_MAX_WINDOW_RECTANGLES:
    case PIPE_CAP_POLYGON_OFFSET_UNITS_UNSCALED:
    case PIPE_CAP_VIEWPORT_SUBPIXEL_BITS:
-   case PIPE_CAP_TGSI_ARRAY_COMPONENTS:
       return 0;
    }
    /* should only get here on unhandled cases */
index dc0c72e363c688b64ed000503d80a32b1ddbbe51..5a3f1014cf2e558550eba2493c2f72179c8d0405 100644 (file)
@@ -409,6 +409,7 @@ static int si_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
        case PIPE_CAP_STRING_MARKER:
        case PIPE_CAP_CLEAR_TEXTURE:
        case PIPE_CAP_CULL_DISTANCE:
+       case PIPE_CAP_TGSI_ARRAY_COMPONENTS:
                return 1;
 
        case PIPE_CAP_RESOURCE_FROM_USER_MEMORY:
@@ -458,7 +459,6 @@ static int si_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
        case PIPE_CAP_PRIMITIVE_RESTART_FOR_PATCHES:
        case PIPE_CAP_TGSI_VOTE:
        case PIPE_CAP_MAX_WINDOW_RECTANGLES:
-       case PIPE_CAP_TGSI_ARRAY_COMPONENTS:
                return 0;
 
        case PIPE_CAP_QUERY_BUFFER_OBJECT:
index a9a81de1a183e42791d97aa6752c6135b28b681c..62449873c0beabd6042ba3e81729471ecbffe09d 100644 (file)
@@ -254,6 +254,7 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_POLYGON_OFFSET_CLAMP:
       return 0;
    case PIPE_CAP_COPY_BETWEEN_COMPRESSED_AND_PLAIN_FORMATS:
+   case PIPE_CAP_TGSI_ARRAY_COMPONENTS:
       return 1;
    case PIPE_CAP_MULTISAMPLE_Z_RESOLVE:
    case PIPE_CAP_RESOURCE_FROM_USER_MEMORY:
@@ -286,7 +287,6 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_MAX_WINDOW_RECTANGLES:
    case PIPE_CAP_POLYGON_OFFSET_UNITS_UNSCALED:
    case PIPE_CAP_VIEWPORT_SUBPIXEL_BITS:
-   case PIPE_CAP_TGSI_ARRAY_COMPONENTS:
       return 0;
    case PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT:
       return 4;
index b9befa1ac573f3ede6a1d52167305d7cd55834c8..b87a3db18704c91068e84abd443b9c1b11730eed 100644 (file)
@@ -892,6 +892,13 @@ void st_init_extensions(struct pipe_screen *screen,
       extensions->AMD_vertex_shader_layer = GL_TRUE;
    }
 
+   if (consts->GLSLVersion >= 140) {
+      if (screen->get_param(screen, PIPE_CAP_TGSI_ARRAY_COMPONENTS) &&
+         screen->get_shader_param(screen, PIPE_SHADER_FRAGMENT,
+                                   PIPE_SHADER_CAP_PREFERRED_IR) == PIPE_SHADER_IR_TGSI)
+         extensions->ARB_enhanced_layouts = GL_TRUE;
+   }
+
    if (consts->GLSLVersion >= 130) {
       consts->NativeIntegers = GL_TRUE;
       consts->MaxClipPlanes = 8;