gallium: rename PIPE_CAP_TGSI_VS_LAYER to also have _VIEWPORT
authorIlia Mirkin <imirkin@alum.mit.edu>
Thu, 3 Jul 2014 15:15:18 +0000 (11:15 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Thu, 3 Jul 2014 23:39:25 +0000 (19:39 -0400)
Now that this cap is used to determine the availability of both, adjust
its name to reflect the new reality.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
17 files changed:
src/gallium/auxiliary/util/u_blitter.c
src/gallium/docs/source/screen.rst
src/gallium/drivers/freedreno/freedreno_screen.c
src/gallium/drivers/i915/i915_screen.c
src/gallium/drivers/ilo/ilo_screen.c
src/gallium/drivers/llvmpipe/lp_screen.c
src/gallium/drivers/nouveau/nv30/nv30_screen.c
src/gallium/drivers/nouveau/nv50/nv50_screen.c
src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
src/gallium/drivers/r300/r300_screen.c
src/gallium/drivers/r600/r600_pipe.c
src/gallium/drivers/radeonsi/si_pipe.c
src/gallium/drivers/softpipe/sp_screen.c
src/gallium/drivers/svga/svga_screen.c
src/gallium/include/pipe/p_defines.h
src/mesa/state_tracker/st_cb_clear.c
src/mesa/state_tracker/st_extensions.c

index 7b058fe2239df070f6e850ff7f5e48df47b9f2e0..db0d1b8940f372087cac5bf7342744446586997b 100644 (file)
@@ -325,7 +325,7 @@ struct blitter_context *util_blitter_create(struct pipe_context *pipe)
    }
 
    if (pipe->screen->get_param(pipe->screen, PIPE_CAP_TGSI_INSTANCEID) &&
-       pipe->screen->get_param(pipe->screen, PIPE_CAP_TGSI_VS_LAYER)) {
+       pipe->screen->get_param(pipe->screen, PIPE_CAP_TGSI_VS_LAYER_VIEWPORT)) {
       ctx->vs_layered = util_make_layered_clear_vertex_shader(pipe);
    }
 
index 2ea0da83f4837ddf51489f4f734fa7b9b82e3dda..ba583fef6c0cf866a7bbdece8510bd493efb3ecb 100644 (file)
@@ -174,8 +174,10 @@ The integer capabilities:
 * ``PIPE_CAP_MIXED_FRAMEBUFFER_SIZES``: Whether it is allowed to have
   different sizes for fb color/zs attachments. This controls whether
   ARB_framebuffer_object is provided.
-* ``PIPE_CAP_TGSI_VS_LAYER``: Whether TGSI_SEMANTIC_LAYER is supported
-  as a vertex shader output.
+* ``PIPE_CAP_TGSI_VS_LAYER_VIEWPORT``: Whether ``TGSI_SEMANTIC_LAYER`` and
+  ``TGSI_SEMANTIC_VIEWPORT_INDEX`` are supported as vertex shader
+  outputs. Note that the viewport will only be used if multiple viewports are
+  exposed.
 * ``PIPE_CAP_MAX_GEOMETRY_OUTPUT_VERTICES``: The maximum number of vertices
   output by a single invocation of a geometry shader.
 * ``PIPE_CAP_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS``: The maximum number of
index ce3cf9056db024d2d4d9458b82c4dac3bf6cdd63..c574cb81f6aba076c1ac482626edfedb8066fb53 100644 (file)
@@ -207,7 +207,7 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
        case PIPE_CAP_USER_INDEX_BUFFERS:
        case PIPE_CAP_QUERY_PIPELINE_STATISTICS:
        case PIPE_CAP_TEXTURE_BORDER_COLOR_QUIRK:
-       case PIPE_CAP_TGSI_VS_LAYER:
+       case PIPE_CAP_TGSI_VS_LAYER_VIEWPORT:
        case PIPE_CAP_MAX_TEXTURE_GATHER_COMPONENTS:
        case PIPE_CAP_TEXTURE_GATHER_SM5:
        case PIPE_CAP_FAKE_SW_MSAA:
index 25432f2b28ac8f00fdb1ff3f7e2e5857c8c530e0..86a7a6731f1795cc08704a41ab6d3d83078e6b31 100644 (file)
@@ -230,7 +230,7 @@ i915_get_param(struct pipe_screen *screen, enum pipe_cap cap)
    case PIPE_CAP_VERTEX_BUFFER_OFFSET_4BYTE_ALIGNED_ONLY:
    case PIPE_CAP_VERTEX_BUFFER_STRIDE_4BYTE_ALIGNED_ONLY:
    case PIPE_CAP_VERTEX_ELEMENT_SRC_OFFSET_4BYTE_ALIGNED_ONLY:
-   case PIPE_CAP_TGSI_VS_LAYER:
+   case PIPE_CAP_TGSI_VS_LAYER_VIEWPORT:
    case PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENT:
    case PIPE_CAP_DRAW_INDIRECT:
       return 0;
index 8f8e1527934dda3ed26377fe963faf7aacb1e312..a7eaa1b3157e833b7ee9a7e0e966d1d1eafba938 100644 (file)
@@ -434,7 +434,7 @@ ilo_get_param(struct pipe_screen *screen, enum pipe_cap param)
       return PIPE_ENDIAN_LITTLE;
    case PIPE_CAP_MIXED_FRAMEBUFFER_SIZES:
       return true;
-   case PIPE_CAP_TGSI_VS_LAYER:
+   case PIPE_CAP_TGSI_VS_LAYER_VIEWPORT:
    case PIPE_CAP_MAX_TEXTURE_GATHER_COMPONENTS:
    case PIPE_CAP_TEXTURE_GATHER_SM5:
    case PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENT:
index 356fad79964a8b54f5651ab810b2c65fa607d75c..3218eb61a154eb4b21b699601faf5d887c5181f5 100644 (file)
@@ -240,7 +240,7 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
       return PIPE_MAX_VIEWPORTS;
    case PIPE_CAP_ENDIANNESS:
       return PIPE_ENDIAN_NATIVE;
-   case PIPE_CAP_TGSI_VS_LAYER:
+   case PIPE_CAP_TGSI_VS_LAYER_VIEWPORT:
    case PIPE_CAP_MAX_TEXTURE_GATHER_COMPONENTS:
    case PIPE_CAP_TEXTURE_GATHER_SM5:
    case PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENT:
index 2866c47325fb8654e2837ccbab337ef96405a1db..32f55236c48152fa43b7dad1b01e893dbf6fc0d4 100644 (file)
@@ -137,7 +137,7 @@ nv30_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_TEXTURE_BORDER_COLOR_QUIRK:
    case PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE:
    case PIPE_CAP_MIXED_FRAMEBUFFER_SIZES:
-   case PIPE_CAP_TGSI_VS_LAYER:
+   case PIPE_CAP_TGSI_VS_LAYER_VIEWPORT:
    case PIPE_CAP_MAX_TEXTURE_GATHER_COMPONENTS:
    case PIPE_CAP_TEXTURE_GATHER_SM5:
    case PIPE_CAP_FAKE_SW_MSAA:
index 375f0dca993826e9702718df043f424578e83ea7..17d8fa3529f642c97a1ef7575f4698ed8140db8f 100644 (file)
@@ -193,7 +193,7 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_VERTEX_ELEMENT_SRC_OFFSET_4BYTE_ALIGNED_ONLY:
    case PIPE_CAP_TGSI_TEXCOORD:
    case PIPE_CAP_QUERY_PIPELINE_STATISTICS:
-   case PIPE_CAP_TGSI_VS_LAYER:
+   case PIPE_CAP_TGSI_VS_LAYER_VIEWPORT:
    case PIPE_CAP_TEXTURE_GATHER_SM5:
    case PIPE_CAP_FAKE_SW_MSAA:
    case PIPE_CAP_TEXTURE_GATHER_OFFSETS:
index 36c1d54eb9b3df334ebf0ae29eabaa22a2cca235..dc9b14384c445ff3e5b47fb5f091a3ba7e62c67c 100644 (file)
@@ -180,7 +180,7 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_VERTEX_BUFFER_OFFSET_4BYTE_ALIGNED_ONLY:
    case PIPE_CAP_VERTEX_BUFFER_STRIDE_4BYTE_ALIGNED_ONLY:
    case PIPE_CAP_VERTEX_ELEMENT_SRC_OFFSET_4BYTE_ALIGNED_ONLY:
-   case PIPE_CAP_TGSI_VS_LAYER:
+   case PIPE_CAP_TGSI_VS_LAYER_VIEWPORT:
    case PIPE_CAP_FAKE_SW_MSAA:
    case PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION:
    case PIPE_CAP_DRAW_INDIRECT:
index 424ef78197944bc226a186dc618bf376885be5ae..efa69d3575e4d127580af41a26a0634efcec8eb1 100644 (file)
@@ -169,7 +169,7 @@ static int r300_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
         case PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT:
         case PIPE_CAP_TEXTURE_BORDER_COLOR_QUIRK:
         case PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE:
-        case PIPE_CAP_TGSI_VS_LAYER:
+        case PIPE_CAP_TGSI_VS_LAYER_VIEWPORT:
         case PIPE_CAP_MAX_TEXTURE_GATHER_COMPONENTS:
         case PIPE_CAP_TEXTURE_GATHER_SM5:
         case PIPE_CAP_TEXTURE_QUERY_LOD:
index 9fc4c98808eb2a03c29b539492254593302e6477..ca6399fa20eeaf5bdb5cf7c0e02d4fb649de1dca 100644 (file)
@@ -302,7 +302,7 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
        /* Supported on Evergreen. */
        case PIPE_CAP_SEAMLESS_CUBE_MAP_PER_TEXTURE:
        case PIPE_CAP_CUBE_MAP_ARRAY:
-       case PIPE_CAP_TGSI_VS_LAYER:
+       case PIPE_CAP_TGSI_VS_LAYER_VIEWPORT:
                return family >= CHIP_CEDAR ? 1 : 0;
 
        /* Unsupported features. */
index 184235d6cf60b4c18588f188f2eab82473c757f5..b90c307887c72cb9dc83cb0a0d83b6e73c14b12b 100644 (file)
@@ -209,7 +209,7 @@ static int si_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
        case PIPE_CAP_TGSI_INSTANCEID:
        case PIPE_CAP_COMPUTE:
        case PIPE_CAP_TEXTURE_BUFFER_OBJECTS:
-        case PIPE_CAP_TGSI_VS_LAYER:
+        case PIPE_CAP_TGSI_VS_LAYER_VIEWPORT:
        case PIPE_CAP_QUERY_PIPELINE_STATISTICS:
        case PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENT:
        case PIPE_CAP_CUBE_MAP_ARRAY:
index cfb10b17a87266408b340724943c8c2da5aab03d..13f47233269a13fb7222a8545dd299a84cd8259b 100644 (file)
@@ -158,7 +158,7 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_USER_INDEX_BUFFERS:
    case PIPE_CAP_USER_CONSTANT_BUFFERS:
    case PIPE_CAP_STREAM_OUTPUT_PAUSE_RESUME:
-   case PIPE_CAP_TGSI_VS_LAYER:
+   case PIPE_CAP_TGSI_VS_LAYER_VIEWPORT:
       return 1;
    case PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENT:
       return 16;
index 806eb9d89bd30977e687ee7996b0723644d6d8df..b213b04bacd7b7f02636270c491890a388b89854 100644 (file)
@@ -268,7 +268,7 @@ svga_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT:
    case PIPE_CAP_QUERY_PIPELINE_STATISTICS:
    case PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE:
-   case PIPE_CAP_TGSI_VS_LAYER:
+   case PIPE_CAP_TGSI_VS_LAYER_VIEWPORT:
    case PIPE_CAP_MAX_TEXTURE_GATHER_COMPONENTS:
    case PIPE_CAP_TEXTURE_GATHER_SM5:
    case PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENT:
index 4d941a03ce6e80c56a74c6848ef33225bd609ba3..d9b6e5aa53d627fcc5b98d03106af05297e309f4 100644 (file)
@@ -547,7 +547,7 @@ enum pipe_cap {
    PIPE_CAP_MAX_VIEWPORTS = 84,
    PIPE_CAP_ENDIANNESS = 85,
    PIPE_CAP_MIXED_FRAMEBUFFER_SIZES = 86,
-   PIPE_CAP_TGSI_VS_LAYER = 87,
+   PIPE_CAP_TGSI_VS_LAYER_VIEWPORT = 87,
    PIPE_CAP_MAX_GEOMETRY_OUTPUT_VERTICES = 88,
    PIPE_CAP_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS = 89,
    PIPE_CAP_MAX_TEXTURE_GATHER_COMPONENTS = 90,
index 371f7fcdae7027cc9a9bf365553071c391c0430e..4bfa8d75aa94b5981a04db524a1562792fad040f 100644 (file)
@@ -136,7 +136,7 @@ set_vertex_shader_layered(struct st_context *st)
    struct pipe_context *pipe = st->pipe;
 
    if (!pipe->screen->get_param(pipe->screen, PIPE_CAP_TGSI_INSTANCEID) ||
-       !pipe->screen->get_param(pipe->screen, PIPE_CAP_TGSI_VS_LAYER)) {
+       !pipe->screen->get_param(pipe->screen, PIPE_CAP_TGSI_VS_LAYER_VIEWPORT)) {
       assert(!"Got layered clear, but the VS layer output is unsupported");
       set_vertex_shader(st);
       return;
index b8b3d504a762f5b9a6a35fb22eb8a522fb8ae7a3..4207cb64a3a26e8a4766cec8f8e4800214c6f1d3 100644 (file)
@@ -624,7 +624,7 @@ void st_init_extensions(struct st_context *st)
    /* This extension needs full OpenGL 3.2, but we don't know if that's
     * supported at this point. Only check the GLSL version. */
    if (ctx->Const.GLSLVersion >= 150 &&
-       screen->get_param(screen, PIPE_CAP_TGSI_VS_LAYER)) {
+       screen->get_param(screen, PIPE_CAP_TGSI_VS_LAYER_VIEWPORT)) {
       ctx->Extensions.AMD_vertex_shader_layer = GL_TRUE;
    }