gallium: Add and handle PIPE_CAP_CONDITIONAL_RENDER_INVERTED
authorTobias Klausmann <tobias.johannes.klausmann@mni.thm.de>
Sun, 17 Aug 2014 01:37:19 +0000 (03:37 +0200)
committerIlia Mirkin <imirkin@alum.mit.edu>
Tue, 19 Aug 2014 12:54:35 +0000 (08:54 -0400)
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Tobias Klausmann <tobias.johannes.klausmann@mni.thm.de>
15 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/si_pipe.c
src/gallium/drivers/softpipe/sp_screen.c
src/gallium/drivers/svga/svga_screen.c
src/gallium/drivers/vc4/vc4_screen.c
src/gallium/include/pipe/p_defines.h

index 26949233286d6c8dc7ab75742d25115de09fb00e..eee254e473aa7e573233c838412fab0bb2ec3eab 100644 (file)
@@ -223,6 +223,8 @@ The integer capabilities:
 * ``PIPE_CAP_VIDEO_MEMORY``: The amount of video memory in megabytes.
 * ``PIPE_CAP_UMA``: If the device has a unified memory architecture or on-card
   memory and GART.
+* ``PIPE_CAP_CONDITIONAL_RENDER_INVERTED``: Whether the driver supports inverted
+  condition for conditional rendering.
 
 
 .. _pipe_capf:
index d797bb438585f071147d09a27e0420bdf47455ba..ab1a7402120783983bdedcbcec75b51db9cda1ba 100644 (file)
@@ -217,6 +217,7 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
        case PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION:
        case PIPE_CAP_DRAW_INDIRECT:
        case PIPE_CAP_TGSI_FS_FINE_DERIVATIVE:
+       case PIPE_CAP_CONDITIONAL_RENDER_INVERTED:
                return 0;
 
        /* Stream output. */
index 0dfd3bb7b1fce8b7094bae7d4f60d49806a7722a..40976b3cb7d0578227bfc527698929b52a0c6638 100644 (file)
@@ -222,6 +222,7 @@ i915_get_param(struct pipe_screen *screen, enum pipe_cap cap)
    case PIPE_CAP_SAMPLE_SHADING:
    case PIPE_CAP_TEXTURE_GATHER_OFFSETS:
    case PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION:
+   case PIPE_CAP_CONDITIONAL_RENDER_INVERTED:
       return 0;
 
    case PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS:
index 2a22a5506540ef6fd2251694237087748343e6c3..15658dad34e63b2a67028537aba8aa9678af4197 100644 (file)
@@ -435,6 +435,7 @@ ilo_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_MAX_VERTEX_STREAMS:
    case PIPE_CAP_DRAW_INDIRECT:
    case PIPE_CAP_TGSI_FS_FINE_DERIVATIVE:
+   case PIPE_CAP_CONDITIONAL_RENDER_INVERTED:
       return 0;
 
    case PIPE_CAP_VENDOR_ID:
index fe52a41107f3bf272e1c5192f928fc212e04cf35..08597fa98599eb389acbfc86715175ca11537e3c 100644 (file)
@@ -250,6 +250,7 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_TEXTURE_GATHER_OFFSETS:
    case PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION:
    case PIPE_CAP_TGSI_FS_FINE_DERIVATIVE:
+   case PIPE_CAP_CONDITIONAL_RENDER_INVERTED:
       return 0;
    case PIPE_CAP_FAKE_SW_MSAA:
       return 1;
index aad242a1addd004e727fb726668b61817e78e62f..80d6943dd32794ad7d96ff0a74195ba705c758fb 100644 (file)
@@ -152,6 +152,7 @@ nv30_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_COMPUTE:
    case PIPE_CAP_DRAW_INDIRECT:
    case PIPE_CAP_TGSI_FS_FINE_DERIVATIVE:
+   case PIPE_CAP_CONDITIONAL_RENDER_INVERTED:
       return 0;
 
    case PIPE_CAP_VENDOR_ID:
index 2b75e3ed26402e2f99fde5beb3295f44514819cf..99dcdc59258f90771e0dd3e90d11971acb320c6a 100644 (file)
@@ -200,6 +200,7 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION:
    case PIPE_CAP_COMPUTE:
    case PIPE_CAP_DRAW_INDIRECT:
+   case PIPE_CAP_CONDITIONAL_RENDER_INVERTED:
       return 0;
 
    case PIPE_CAP_VENDOR_ID:
index 0a8ca391addcb463aa8765c2eaf5f884e13a2120..7c2f11ab07e0cfc32819875b0365a6af18dd9cc8 100644 (file)
@@ -172,6 +172,8 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
       return (class_3d >= NVE4_3D_CLASS) ? 1 : 0;
    case PIPE_CAP_COMPUTE:
       return (class_3d == NVE4_3D_CLASS) ? 1 : 0;
+   case PIPE_CAP_CONDITIONAL_RENDER_INVERTED:
+     return 0;
 
    /* unsupported caps */
    case PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT:
index 3d489e14c41d0f9e744d979d65535b2cf9932f9f..a64f5f5dbfb2e9273152d37e76cb04ad37c7b204 100644 (file)
@@ -179,6 +179,7 @@ static int r300_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
         case PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION:
         case PIPE_CAP_DRAW_INDIRECT:
         case PIPE_CAP_TGSI_FS_FINE_DERIVATIVE:
+        case PIPE_CAP_CONDITIONAL_RENDER_INVERTED:
             return 0;
 
         /* SWTCL-only features. */
index 226ad6e0200eff48189d165e3de393a4ee4d7d4b..e02c053deb00de7d631f7dafac055ef36b5c7587 100644 (file)
@@ -319,6 +319,7 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
        case PIPE_CAP_SAMPLE_SHADING:
        case PIPE_CAP_TEXTURE_GATHER_OFFSETS:
        case PIPE_CAP_DRAW_INDIRECT:
+       case PIPE_CAP_CONDITIONAL_RENDER_INVERTED:
                return 0;
 
        /* Stream output. */
index 845ab20da373bf7b8f9fbc8769fcac72654e3272..ae1d043e83942ff30e1a543ec0654ff256d8d379 100644 (file)
@@ -255,6 +255,7 @@ static int si_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
        case PIPE_CAP_TEXTURE_GATHER_OFFSETS:
        case PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION:
        case PIPE_CAP_TGSI_FS_FINE_DERIVATIVE:
+       case PIPE_CAP_CONDITIONAL_RENDER_INVERTED:
                return 0;
 
        case PIPE_CAP_TEXTURE_BORDER_COLOR_QUIRK:
index ade68a83cdabe629960d0dc847c4c5228ea5bfbb..8fd4a0da3bdd58d8941512b54c15ef950d2eb99f 100644 (file)
@@ -222,6 +222,8 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
    }
    case PIPE_CAP_UMA:
       return 0;
+   case PIPE_CAP_CONDITIONAL_RENDER_INVERTED:
+      return 0;
    }
    /* should only get here on unhandled cases */
    debug_printf("Unexpected PIPE_CAP %d query\n", param);
index 0fc961923115d46918d9ab5796722030601b927a..544d9295b68695ebc58ae6e6dd56074596e3c8a2 100644 (file)
@@ -279,6 +279,7 @@ svga_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION:
    case PIPE_CAP_DRAW_INDIRECT:
    case PIPE_CAP_TGSI_FS_FINE_DERIVATIVE:
+   case PIPE_CAP_CONDITIONAL_RENDER_INVERTED:
       return 0;
    case PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT:
       return 64;
index 41fd373de11e18f16f50150bd1ef0aed29a5f220..4a86e21169df8901b2504dcefb4a3fc3ba0853b9 100644 (file)
@@ -159,6 +159,7 @@ vc4_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
         case PIPE_CAP_MAX_VERTEX_STREAMS:
         case PIPE_CAP_DRAW_INDIRECT:
         case PIPE_CAP_TGSI_FS_FINE_DERIVATIVE:
+        case PIPE_CAP_CONDITIONAL_RENDER_INVERTED:
                 return 0;
 
                 /* Stream output. */
index 1a31350fe3111b6fff733844e8c3df1bac872033..04e47986fdd12d6616a495693650fc3f3703ba9c 100644 (file)
@@ -568,6 +568,7 @@ enum pipe_cap {
    PIPE_CAP_ACCELERATED = 105,
    PIPE_CAP_VIDEO_MEMORY = 106,
    PIPE_CAP_UMA = 107,
+   PIPE_CAP_CONDITIONAL_RENDER_INVERTED = 108,
 };
 
 #define PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_NV50 (1 << 0)