gallium: add PIPE_CAP_MIXED_FRAMEBUFFER_SIZES
authorIlia Mirkin <imirkin@alum.mit.edu>
Fri, 4 Oct 2013 08:32:15 +0000 (04:32 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Fri, 25 Oct 2013 23:36:07 +0000 (01:36 +0200)
This CAP will determine whether ARB_framebuffer_object can be enabled.
The nv30 driver does not allow mixing swizzled and linear zsbuf/cbuf
textures.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
14 files changed:
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/radeonsi_pipe.c
src/gallium/drivers/softpipe/sp_screen.c
src/gallium/drivers/svga/svga_screen.c
src/gallium/include/pipe/p_defines.h

index d19cd1a7446d68e7ef61507862b8aedfa3f0d7e1..a01f5480f52be5c42d52b4c66b057a6744d9c860 100644 (file)
@@ -173,6 +173,9 @@ The integer capabilities:
   viewport/scissor combination.  
 * ''PIPE_CAP_ENDIANNESS``:: The endianness of the device.  Either
   PIPE_ENDIAN_BIG or PIPE_ENDIAN_LITTLE.
+* ``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_capf:
index 2be242af191208fb3413b2351ad676e4881c1a94..875b506fb10d9df206d9b02ab97a7af6f5160bd7 100644 (file)
@@ -140,6 +140,7 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
        switch (param) {
        /* Supported features (boolean caps). */
        case PIPE_CAP_NPOT_TEXTURES:
+       case PIPE_CAP_MIXED_FRAMEBUFFER_SIZES:
        case PIPE_CAP_TWO_SIDED_STENCIL:
        case PIPE_CAP_ANISOTROPIC_FILTER:
        case PIPE_CAP_POINT_SPRITE:
index 556dda8d337b41bd714367a58275ac60b36c440f..77607d0621dbaf60c3eeb91c75a0b4ed297574f4 100644 (file)
@@ -172,6 +172,7 @@ i915_get_param(struct pipe_screen *screen, enum pipe_cap cap)
    /* Supported features (boolean caps). */
    case PIPE_CAP_ANISOTROPIC_FILTER:
    case PIPE_CAP_NPOT_TEXTURES:
+   case PIPE_CAP_MIXED_FRAMEBUFFER_SIZES:
    case PIPE_CAP_POINT_SPRITE:
    case PIPE_CAP_PRIMITIVE_RESTART: /* draw module */
    case PIPE_CAP_TEXTURE_SHADOW_MAP:
index 3f8d4319c91b761c1e4ddddb20d4df31cbac9c47..ddf11ff9679e73bc7137edbf7fa5fe9478a94ddd 100644 (file)
@@ -286,6 +286,7 @@ ilo_get_param(struct pipe_screen *screen, enum pipe_cap param)
 
    switch (param) {
    case PIPE_CAP_NPOT_TEXTURES:
+   case PIPE_CAP_MIXED_FRAMEBUFFER_SIZES:
    case PIPE_CAP_TWO_SIDED_STENCIL:
       return true;
    case PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS:
index 4c81022876f79358062adba8d93fab47ad7d2c9a..f61df98fb9443045d2d01284a37e9887d0650097 100644 (file)
@@ -109,6 +109,7 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_MAX_COMBINED_SAMPLERS:
       return 2 * PIPE_MAX_SAMPLERS;  /* VS + FS samplers */
    case PIPE_CAP_NPOT_TEXTURES:
+   case PIPE_CAP_MIXED_FRAMEBUFFER_SIZES:
       return 1;
    case PIPE_CAP_TWO_SIDED_STENCIL:
       return 1;
index 50ddfec3b215b3e0e06d9f49e04a6b62020a4d93..807100ee0d087c79c930bc168837f8e1e910b295 100644 (file)
@@ -125,6 +125,7 @@ nv30_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_QUERY_PIPELINE_STATISTICS:
    case PIPE_CAP_TEXTURE_BORDER_COLOR_QUIRK:
    case PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE:
+   case PIPE_CAP_MIXED_FRAMEBUFFER_SIZES:
       return 0;
    case PIPE_CAP_VERTEX_BUFFER_OFFSET_4BYTE_ALIGNED_ONLY:
    case PIPE_CAP_VERTEX_BUFFER_STRIDE_4BYTE_ALIGNED_ONLY:
index a6bce342ccd1793a9b3abe25380632286cf49fe1..0ce9e34f5e59100b797fb5f070a28177731e3052 100644 (file)
@@ -103,6 +103,7 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_TEXTURE_SWIZZLE:
    case PIPE_CAP_TEXTURE_SHADOW_MAP:
    case PIPE_CAP_NPOT_TEXTURES:
+   case PIPE_CAP_MIXED_FRAMEBUFFER_SIZES:
    case PIPE_CAP_ANISOTROPIC_FILTER:
    case PIPE_CAP_SCALED_RESOLVE:
    case PIPE_CAP_TEXTURE_BUFFER_OBJECTS:
index ff7890bbac46bee6214e9841ea7d2b0b6a2b2b3a..253ee790540af90dfa95acab1e281dffcb5d33c8 100644 (file)
@@ -88,6 +88,7 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_TEXTURE_SWIZZLE:
    case PIPE_CAP_TEXTURE_SHADOW_MAP:
    case PIPE_CAP_NPOT_TEXTURES:
+   case PIPE_CAP_MIXED_FRAMEBUFFER_SIZES:
    case PIPE_CAP_ANISOTROPIC_FILTER:
    case PIPE_CAP_SEAMLESS_CUBE_MAP:
    case PIPE_CAP_CUBE_MAP_ARRAY:
index 9ec58a9f504b0dd0a36984b425f037d4ad66b083..476770afe449c47c925ef991dc2c410cc1c2c56c 100644 (file)
@@ -89,6 +89,7 @@ static int r300_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
     switch (param) {
         /* Supported features (boolean caps). */
         case PIPE_CAP_NPOT_TEXTURES:
+        case PIPE_CAP_MIXED_FRAMEBUFFER_SIZES:
         case PIPE_CAP_TWO_SIDED_STENCIL:
         case PIPE_CAP_ANISOTROPIC_FILTER:
         case PIPE_CAP_POINT_SPRITE:
index 9da42d17d22ea31b0bd9a5586de439bea6cb4dea..633c22a1cce4ac33aad09add0272b7df429e97eb 100644 (file)
@@ -390,6 +390,7 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
        switch (param) {
        /* Supported features (boolean caps). */
        case PIPE_CAP_NPOT_TEXTURES:
+       case PIPE_CAP_MIXED_FRAMEBUFFER_SIZES:
        case PIPE_CAP_TWO_SIDED_STENCIL:
        case PIPE_CAP_ANISOTROPIC_FILTER:
        case PIPE_CAP_POINT_SPRITE:
index b2f0866900bff8cb341f20a0a3612bb28b5345bd..6da4c5ebb5340fb65a27009bf1fe62494b1c5e92 100644 (file)
@@ -301,6 +301,7 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
        case PIPE_CAP_USER_CONSTANT_BUFFERS:
        case PIPE_CAP_START_INSTANCE:
        case PIPE_CAP_NPOT_TEXTURES:
+       case PIPE_CAP_MIXED_FRAMEBUFFER_SIZES:
         case PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER:
        case PIPE_CAP_TGSI_INSTANCEID:
        case PIPE_CAP_COMPUTE:
index 4762ac312fffab411a22b9d594ed4f7ea230db27..47ef20ec59a179dd3e620034435f58d8a3b5683a 100644 (file)
@@ -69,6 +69,7 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_MAX_COMBINED_SAMPLERS:
       return 2 * PIPE_MAX_SAMPLERS;  /* VS + FS */
    case PIPE_CAP_NPOT_TEXTURES:
+   case PIPE_CAP_MIXED_FRAMEBUFFER_SIZES:
       return 1;
    case PIPE_CAP_TWO_SIDED_STENCIL:
       return 1;
index 93d16124c626680a4d645b709b7d081df0b2109c..49e3b497f44a9df23f6f39f629a097f119153303 100644 (file)
@@ -141,6 +141,7 @@ svga_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_MAX_COMBINED_SAMPLERS:
       return 16;
    case PIPE_CAP_NPOT_TEXTURES:
+   case PIPE_CAP_MIXED_FRAMEBUFFER_SIZES:
       return 1;
    case PIPE_CAP_TWO_SIDED_STENCIL:
       return 1;
index 63869c9368787af103f3e851ff2cceea442528f9..db6db32e744bc4062412e0185c48c5e1d2ef2fc3 100644 (file)
@@ -512,7 +512,8 @@ enum pipe_cap {
    PIPE_CAP_TEXTURE_BORDER_COLOR_QUIRK = 82,
    PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE = 83,
    PIPE_CAP_MAX_VIEWPORTS = 84,
-   PIPE_CAP_ENDIANNESS = 85
+   PIPE_CAP_ENDIANNESS = 85,
+   PIPE_CAP_MIXED_FRAMEBUFFER_SIZES = 86
 };
 
 #define PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_NV50 (1 << 0)