gallium: add PIPE_CAP_TGSI_FS_FBFETCH
authorIlia Mirkin <imirkin@alum.mit.edu>
Mon, 2 Jan 2017 04:10:00 +0000 (23:10 -0500)
committerIlia Mirkin <imirkin@alum.mit.edu>
Tue, 17 Jan 2017 02:13:09 +0000 (21:13 -0500)
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
17 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/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 000551aac7976e84519e422bede7eb0893d89509..64cb0bf0b4fd19f49c36ca55053e698803b71155 100644 (file)
@@ -369,6 +369,8 @@ The integer capabilities:
 * ``PIPE_CAP_GLSL_OPTIMIZE_CONSERVATIVELY``: Tell the GLSL compiler to use
   the minimum amount of optimizations just to be able to do all the linking
   and lowering.
+* ``PIPE_CAP_TGSI_FS_FBFETCH``: Whether a fragment shader can use the FBFETCH
+  opcode to retrieve the current value in the framebuffer.
 
 
 .. _pipe_capf:
index 2ff89eb0f37cb294949eeedbb8abe2c2df86869a..1b2c58800f1a3dc655a30569f858e54aa98691a2 100644 (file)
@@ -295,7 +295,8 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
        case PIPE_CAP_VIEWPORT_SUBPIXEL_BITS:
        case PIPE_CAP_TGSI_ARRAY_COMPONENTS:
        case PIPE_CAP_TGSI_CAN_READ_OUTPUTS:
-        case PIPE_CAP_GLSL_OPTIMIZE_CONSERVATIVELY:
+       case PIPE_CAP_GLSL_OPTIMIZE_CONSERVATIVELY:
+       case PIPE_CAP_TGSI_FS_FBFETCH:
                return 0;
 
        case PIPE_CAP_MAX_VIEWPORTS:
index 18578c09027f8464a40b5e503ea9b8f6c3f31f0e..8ab6cd9e99482ac7854a872c48a3a127b9e9cf52 100644 (file)
@@ -297,6 +297,7 @@ i915_get_param(struct pipe_screen *screen, enum pipe_cap cap)
    case PIPE_CAP_TGSI_CAN_READ_OUTPUTS:
    case PIPE_CAP_NATIVE_FENCE_FD:
    case PIPE_CAP_GLSL_OPTIMIZE_CONSERVATIVELY:
+   case PIPE_CAP_TGSI_FS_FBFETCH:
       return 0;
 
    case PIPE_CAP_MAX_VIEWPORTS:
index 20a0e8d55fad7860fc1b4b42b7a9e4fbd4f4d0e2..20a4ee31e45ac39f62bb52e57f09a6c80a0ea58a 100644 (file)
@@ -520,6 +520,7 @@ ilo_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_TGSI_CAN_READ_OUTPUTS:
    case PIPE_CAP_NATIVE_FENCE_FD:
    case PIPE_CAP_GLSL_OPTIMIZE_CONSERVATIVELY:
+   case PIPE_CAP_TGSI_FS_FBFETCH:
       return 0;
 
    case PIPE_CAP_VENDOR_ID:
index 4501df46316a60713e62e0313bb06a23a02c3372..02f14af543daa05592551a98c3e1bfe857431e20 100644 (file)
@@ -341,6 +341,7 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_TGSI_CAN_READ_OUTPUTS:
    case PIPE_CAP_NATIVE_FENCE_FD:
    case PIPE_CAP_GLSL_OPTIMIZE_CONSERVATIVELY:
+   case PIPE_CAP_TGSI_FS_FBFETCH:
       return 0;
    }
    /* should only get here on unhandled cases */
index 19df068e39bcd1213014aa068263fad3e864aa80..7dfc0fce73d2deac6be7c04283fea9ad944ee8be 100644 (file)
@@ -206,6 +206,7 @@ nv30_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_TGSI_CAN_READ_OUTPUTS:
    case PIPE_CAP_NATIVE_FENCE_FD:
    case PIPE_CAP_GLSL_OPTIMIZE_CONSERVATIVELY:
+   case PIPE_CAP_TGSI_FS_FBFETCH:
       return 0;
 
    case PIPE_CAP_VENDOR_ID:
index 56370014bc237cdcd8b54dc3584db7b537cc84cb..f766aadb06c09301aade862e48a6e7b0ff53b460 100644 (file)
@@ -258,6 +258,7 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_TGSI_CAN_READ_OUTPUTS:
    case PIPE_CAP_NATIVE_FENCE_FD:
    case PIPE_CAP_GLSL_OPTIMIZE_CONSERVATIVELY:
+   case PIPE_CAP_TGSI_FS_FBFETCH:
       return 0;
 
    case PIPE_CAP_VENDOR_ID:
index b6e4c6cfe96f83d2a7c3dbf05fb3730daff88793..ac9dd5b0642959a1a545ef11a417ff1da0aaa6ef 100644 (file)
@@ -275,6 +275,7 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_TGSI_CAN_READ_OUTPUTS:
    case PIPE_CAP_NATIVE_FENCE_FD:
    case PIPE_CAP_GLSL_OPTIMIZE_CONSERVATIVELY:
+   case PIPE_CAP_TGSI_FS_FBFETCH:
       return 0;
 
    case PIPE_CAP_VENDOR_ID:
index 50a42efef0ee965b24a1e0a9a3bd498661bedf9d..18c02253c98f9555d291c51ef940e8f769cc26ff 100644 (file)
@@ -228,6 +228,7 @@ static int r300_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
         case PIPE_CAP_TGSI_CAN_READ_OUTPUTS:
         case PIPE_CAP_NATIVE_FENCE_FD:
         case PIPE_CAP_GLSL_OPTIMIZE_CONSERVATIVELY:
+        case PIPE_CAP_TGSI_FS_FBFETCH:
             return 0;
 
         /* SWTCL-only features. */
index a0da24f096713f059547a5c001a0e0026c41c605..7c723e522676262762debad13852c08bc7bc272a 100644 (file)
@@ -376,7 +376,8 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
        case PIPE_CAP_TGSI_ARRAY_COMPONENTS:
        case PIPE_CAP_TGSI_CAN_READ_OUTPUTS:
        case PIPE_CAP_NATIVE_FENCE_FD:
-        case PIPE_CAP_GLSL_OPTIMIZE_CONSERVATIVELY:
+       case PIPE_CAP_GLSL_OPTIMIZE_CONSERVATIVELY:
+       case PIPE_CAP_TGSI_FS_FBFETCH:
                return 0;
 
        case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS:
index 842eb5994d337ed0e5eb517bbf1d8f18c4eb65d2..6711a08f2a4b72441615a669d659744812cfec3c 100644 (file)
@@ -464,6 +464,7 @@ static int si_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
        case PIPE_CAP_TGSI_VOTE:
        case PIPE_CAP_MAX_WINDOW_RECTANGLES:
        case PIPE_CAP_NATIVE_FENCE_FD:
+       case PIPE_CAP_TGSI_FS_FBFETCH:
                return 0;
 
        case PIPE_CAP_QUERY_BUFFER_OBJECT:
index 93c75032b4d601800d01f9e87f1f71290e17757e..b18f1bf24b250a0c420b8c1dbc910cc8c055e644 100644 (file)
@@ -291,6 +291,7 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_TGSI_CAN_READ_OUTPUTS:
    case PIPE_CAP_NATIVE_FENCE_FD:
    case PIPE_CAP_GLSL_OPTIMIZE_CONSERVATIVELY:
+   case PIPE_CAP_TGSI_FS_FBFETCH:
       return 0;
    case PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT:
       return 4;
index 3e274749e18680e119bf9b59d7308cfc89f992c3..a309fe7c1bf2154881c644c706004c5dfcba787f 100644 (file)
@@ -422,6 +422,7 @@ svga_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_TGSI_ARRAY_COMPONENTS:
    case PIPE_CAP_TGSI_CAN_READ_OUTPUTS:
    case PIPE_CAP_GLSL_OPTIMIZE_CONSERVATIVELY:
+   case PIPE_CAP_TGSI_FS_FBFETCH:
       return 0;
    }
 
index 50123887b50b23bfb3c9d5830091b8e406875f03..761bcd4feda48593576caa812d19246694d26178 100644 (file)
@@ -315,6 +315,7 @@ swr_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_STREAM_OUTPUT_PAUSE_RESUME:
    case PIPE_CAP_NATIVE_FENCE_FD:
    case PIPE_CAP_GLSL_OPTIMIZE_CONSERVATIVELY:
+   case PIPE_CAP_TGSI_FS_FBFETCH:
       return 0;
 
    case PIPE_CAP_VENDOR_ID:
index 3da6202e0203bf45731891b55095289829d40272..86b589243d8458f0405852cf14393e38812a6ae6 100644 (file)
@@ -242,6 +242,7 @@ vc4_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
         case PIPE_CAP_TGSI_CAN_READ_OUTPUTS:
         case PIPE_CAP_NATIVE_FENCE_FD:
         case PIPE_CAP_GLSL_OPTIMIZE_CONSERVATIVELY:
+        case PIPE_CAP_TGSI_FS_FBFETCH:
                 return 0;
 
                 /* Stream output. */
index 0a18aa03f028586fc0ef04c1291b367e75bfa682..d45da700c6a0414c299fd749eddcf936d1412353 100644 (file)
@@ -252,6 +252,7 @@ virgl_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_TGSI_ARRAY_COMPONENTS:
    case PIPE_CAP_TGSI_CAN_READ_OUTPUTS:
    case PIPE_CAP_GLSL_OPTIMIZE_CONSERVATIVELY:
+   case PIPE_CAP_TGSI_FS_FBFETCH:
       return 0;
    case PIPE_CAP_VENDOR_ID:
       return 0x1af4;
index 7dfd7dd5b32a1e1f66cc526880d0d39d8c830cac..d5139c7f8f1decd0be9633b8458cf8a3bfc3c220 100644 (file)
@@ -744,6 +744,7 @@ enum pipe_cap
    PIPE_CAP_TGSI_CAN_READ_OUTPUTS,
    PIPE_CAP_NATIVE_FENCE_FD,
    PIPE_CAP_GLSL_OPTIMIZE_CONSERVATIVELY,
+   PIPE_CAP_TGSI_FS_FBFETCH,
 };
 
 #define PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_NV50 (1 << 0)