gallium: Add a cap to check if the driver supports fill_rectangle
authorLyude <lyude@redhat.com>
Thu, 16 Mar 2017 22:00:05 +0000 (18:00 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Sat, 1 Apr 2017 01:41:24 +0000 (21:41 -0400)
Changes since v1:
- Add pipe caps for etnaviv, freedreno, swr and virgl

Signed-off-by: Lyude <lyude@redhat.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
17 files changed:
src/gallium/docs/source/screen.rst
src/gallium/drivers/etnaviv/etnaviv_screen.c
src/gallium/drivers/freedreno/freedreno_screen.c
src/gallium/drivers/i915/i915_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/swr/swr_screen.cpp
src/gallium/drivers/vc4/vc4_screen.c
src/gallium/drivers/virgl/virgl_screen.c
src/gallium/include/pipe/p_defines.h

index 28be39fc33f09c86dfd74a0717ba8e195be1b8a9..da513ccd11db87ac20b102aa5b60d0270ca21449 100644 (file)
@@ -377,6 +377,10 @@ The integer capabilities:
 * ``PIPE_CAP_TGSI_TEX_TXF_LZ``: Whether TEX_LZ and TXF_LZ opcodes are
   supported.
 * ``PIPE_CAP_TGSI_CLOCK``: Whether the CLOCK opcode is supported.
+* ``PIPE_CAP_POLYGON_MODE_FILL_RECTANGLE``: Whether the
+  PIPE_POLYGON_MODE_FILL_RECTANGLE mode is supported for
+  ``pipe_rasterizer_state::fill_front`` and
+  ``pipe_rasterizer_state::fill_back``.
 
 
 .. _pipe_capf:
index 1d28800c066de5006b267eecfda8059825884bd2..75d4fba5b66e30b8e6a2f043d42098b74174e6f7 100644 (file)
@@ -246,6 +246,7 @@ etna_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_INT64_DIVMOD:
    case PIPE_CAP_TGSI_TEX_TXF_LZ:
    case PIPE_CAP_TGSI_CLOCK:
+   case PIPE_CAP_POLYGON_MODE_FILL_RECTANGLE:
       return 0;
 
    /* Stream output. */
index d4c16dadc58d4e38ffcc11b168276e1ab0924c8b..aab3470c069a5d4502eb615f76c884b86bfa7d72 100644 (file)
@@ -303,6 +303,7 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
        case PIPE_CAP_INT64_DIVMOD:
        case PIPE_CAP_TGSI_TEX_TXF_LZ:
        case PIPE_CAP_TGSI_CLOCK:
+       case PIPE_CAP_POLYGON_MODE_FILL_RECTANGLE:
                return 0;
 
        case PIPE_CAP_MAX_VIEWPORTS:
index 2938af52d9599f5df60f78a253a6e9a84849626f..c66ae0b0cb9af7e0dc490bde93bace32458341b0 100644 (file)
@@ -276,6 +276,7 @@ i915_get_param(struct pipe_screen *screen, enum pipe_cap cap)
    case PIPE_CAP_MAX_WINDOW_RECTANGLES:
    case PIPE_CAP_POLYGON_OFFSET_UNITS_UNSCALED:
    case PIPE_CAP_TGSI_ARRAY_COMPONENTS:
+   case PIPE_CAP_POLYGON_MODE_FILL_RECTANGLE:
       return 0;
 
    case PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS:
index 0b399dd57b0099b9c6aa80973e43e937e9d13c95..f020a3a4e4d09356c2dd170ed01d0fcca323b932 100644 (file)
@@ -348,6 +348,7 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_TGSI_FS_FBFETCH:
    case PIPE_CAP_TGSI_MUL_ZERO_WINS:
    case PIPE_CAP_TGSI_CLOCK:
+   case PIPE_CAP_POLYGON_MODE_FILL_RECTANGLE:
       return 0;
    }
    /* should only get here on unhandled cases */
index e2febc327108ba83089b47637d93cb3f6bf1f788..77cbeddf72930f16b2ebce3fca52aa3589f0741a 100644 (file)
@@ -212,6 +212,7 @@ nv30_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_INT64_DIVMOD:
    case PIPE_CAP_TGSI_TEX_TXF_LZ:
    case PIPE_CAP_TGSI_CLOCK:
+   case PIPE_CAP_POLYGON_MODE_FILL_RECTANGLE:
       return 0;
 
    case PIPE_CAP_VENDOR_ID:
index 7cf66ac092c9495b0341c8e9b856d8e7fb0223f3..e82f172bd31108c18aa44ccb57e38d50b614bae9 100644 (file)
@@ -264,6 +264,7 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_INT64:
    case PIPE_CAP_INT64_DIVMOD:
    case PIPE_CAP_TGSI_CLOCK:
+   case PIPE_CAP_POLYGON_MODE_FILL_RECTANGLE:
       return 0;
 
    case PIPE_CAP_VENDOR_ID:
index 17e270e4f846a39a435ee46cdd41c4cb0fdef97a..9631c6fd0a9a9ae202368154afc253cb874ec1cd 100644 (file)
@@ -286,6 +286,7 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_GLSL_OPTIMIZE_CONSERVATIVELY:
    case PIPE_CAP_INT64_DIVMOD:
    case PIPE_CAP_TGSI_CLOCK:
+   case PIPE_CAP_POLYGON_MODE_FILL_RECTANGLE:
       return 0;
 
    case PIPE_CAP_VENDOR_ID:
index 39c71f5f9e2d7c4b37b26f36602db93b19af27bc..2fce22e97568d0eb39524899c4d83b66008ebf3f 100644 (file)
@@ -234,6 +234,7 @@ static int r300_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
         case PIPE_CAP_INT64_DIVMOD:
         case PIPE_CAP_TGSI_TEX_TXF_LZ:
         case PIPE_CAP_TGSI_CLOCK:
+        case PIPE_CAP_POLYGON_MODE_FILL_RECTANGLE:
             return 0;
 
         /* SWTCL-only features. */
index dbd5861a7a50793a6fbd93e913949f273a466bfd..fc01c637c5444eb7c9ab350c3f047cb6097f1daf 100644 (file)
@@ -382,6 +382,7 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
        case PIPE_CAP_INT64_DIVMOD:
        case PIPE_CAP_TGSI_TEX_TXF_LZ:
        case PIPE_CAP_TGSI_CLOCK:
+       case PIPE_CAP_POLYGON_MODE_FILL_RECTANGLE:
                return 0;
 
        case PIPE_CAP_DOUBLES:
index 5a4a2e276a51b30a9ce8c24dd4628d8d538fe695..ca1e99c26dde3bb9061d5bd7878970c5b60175d9 100644 (file)
@@ -492,6 +492,7 @@ static int si_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
        case PIPE_CAP_TGSI_FS_FBFETCH:
        case PIPE_CAP_TGSI_MUL_ZERO_WINS:
        case PIPE_CAP_UMA:
+       case PIPE_CAP_POLYGON_MODE_FILL_RECTANGLE:
                return 0;
 
        case PIPE_CAP_QUERY_BUFFER_OBJECT:
index 5d64839110b1f5979f98adefb1ded523a0967218..22c6f0bf6471fe53d518ba7631ec3a371966d282 100644 (file)
@@ -298,6 +298,7 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_TGSI_FS_FBFETCH:
    case PIPE_CAP_TGSI_MUL_ZERO_WINS:
    case PIPE_CAP_TGSI_CLOCK:
+   case PIPE_CAP_POLYGON_MODE_FILL_RECTANGLE:
       return 0;
    case PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT:
       return 4;
index fbe0a4d4ccb73eed2702362b73fb21a34c774493..5459854267baccdc4d7edac6a26ed6b5930c26c0 100644 (file)
@@ -428,6 +428,7 @@ svga_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_INT64_DIVMOD:
    case PIPE_CAP_TGSI_TEX_TXF_LZ:
    case PIPE_CAP_TGSI_CLOCK:
+   case PIPE_CAP_POLYGON_MODE_FILL_RECTANGLE:
       return 0;
    }
 
index d218b679b5920712e09baee7a869aadd93a80719..dd50c2e29413e4feda04fe3543dde4544ee09537 100644 (file)
@@ -320,6 +320,7 @@ swr_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_INT64_DIVMOD:
    case PIPE_CAP_TGSI_TEX_TXF_LZ:
    case PIPE_CAP_TGSI_CLOCK:
+   case PIPE_CAP_POLYGON_MODE_FILL_RECTANGLE:
       return 0;
 
    case PIPE_CAP_VENDOR_ID:
index 8028537df0b6f224b31a6a8fcd2dc25d66e94fe5..1716082b1380f0869550accfdded5993f2dfa182 100644 (file)
@@ -248,6 +248,7 @@ vc4_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
         case PIPE_CAP_INT64_DIVMOD:
         case PIPE_CAP_TGSI_TEX_TXF_LZ:
         case PIPE_CAP_TGSI_CLOCK:
+        case PIPE_CAP_POLYGON_MODE_FILL_RECTANGLE:
                 return 0;
 
                 /* Stream output. */
index 466ca55dfd022e3b17084fc64da8841597e77556..75624b1257945910ac98a782b80780b069b67ab9 100644 (file)
@@ -257,6 +257,7 @@ virgl_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_INT64_DIVMOD:
    case PIPE_CAP_TGSI_TEX_TXF_LZ:
    case PIPE_CAP_TGSI_CLOCK:
+   case PIPE_CAP_POLYGON_MODE_FILL_RECTANGLE:
       return 0;
    case PIPE_CAP_VENDOR_ID:
       return 0x1af4;
index ec4c093a849d7f01248314f5e4045d0504dc30e1..6fadb448aa29b7e47f06e841dd0864e5e63fede6 100644 (file)
@@ -756,6 +756,7 @@ enum pipe_cap
    PIPE_CAP_INT64_DIVMOD,
    PIPE_CAP_TGSI_TEX_TXF_LZ,
    PIPE_CAP_TGSI_CLOCK,
+   PIPE_CAP_POLYGON_MODE_FILL_RECTANGLE,
 };
 
 #define PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_NV50 (1 << 0)