gallium: add PIPE_CAP_QUERY_PIPELINE_STATISTICS
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>
Fri, 29 Mar 2013 12:02:49 +0000 (13:02 +0100)
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>
Wed, 3 Apr 2013 10:54:43 +0000 (12:54 +0200)
Reviewed-by: Marek Olšák <maraeo@gmail.com>
12 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/llvmpipe/lp_screen.c
src/gallium/drivers/nv30/nv30_screen.c
src/gallium/drivers/nv50/nv50_screen.c
src/gallium/drivers/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/include/pipe/p_defines.h

index 8c7e86e1b21ed0511a875390e22f7a5fd270ebb2..c1a3c0b1e734666d2b8b9f74307528e3e5b17f0f 100644 (file)
@@ -149,6 +149,8 @@ The integer capabilities:
   to use a blit to implement a texture transfer which needs format conversions
   and swizzling in state trackers. Generally, all hardware drivers with
   dedicated memory should return 1 and all software rasterizers should return 0.
+* ``PIPE_CAP_QUERY_PIPELINE_STATISTICS``: Whether PIPE_QUERY_PIPELINE_STATISTICS
+  is supported.
 
 
 .. _pipe_capf:
index 79eef5e1340dc5e42f9a08e82c7f2f9475c87df9..283d07f12e41e35fd40cb989737e71a89da875ee 100644 (file)
@@ -199,6 +199,7 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
        case PIPE_CAP_VERTEX_COLOR_CLAMPED:
        case PIPE_CAP_USER_VERTEX_BUFFERS:
        case PIPE_CAP_USER_INDEX_BUFFERS:
+       case PIPE_CAP_QUERY_PIPELINE_STATISTICS:
                return 0;
 
        /* Stream output. */
index 13aa91c29bdfec310c350ff848c0c4f75ca193d0..54b21549ba5fefe7100624fcaf3fab2d52b6ed23 100644 (file)
@@ -210,6 +210,7 @@ i915_get_param(struct pipe_screen *screen, enum pipe_cap cap)
    case PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION:
    case PIPE_CAP_START_INSTANCE:
    case PIPE_CAP_QUERY_TIMESTAMP:
+   case PIPE_CAP_QUERY_PIPELINE_STATISTICS:
    case PIPE_CAP_TEXTURE_MULTISAMPLE:
    case PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT:
       return 0;
index e8c6ab1f8064dcad68fcc5d18d27e4962d6f0367..6700887fb8fe40055620c37001cb43ab043922f9 100644 (file)
@@ -130,6 +130,8 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
       return 0;
    case PIPE_CAP_QUERY_TIMESTAMP:
       return 1;
+   case PIPE_CAP_QUERY_PIPELINE_STATISTICS:
+      return 0;
    case PIPE_CAP_TEXTURE_MIRROR_CLAMP:
       return 1;
    case PIPE_CAP_TEXTURE_SHADOW_MAP:
index 4084869dba8dbe6dce56964a2e9d60de1a8dde50..e33710e71f74e6a39fcdf5a42c0360efcc98357a 100644 (file)
@@ -122,6 +122,7 @@ nv30_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT:
    case PIPE_CAP_TEXTURE_BUFFER_OBJECTS:
    case PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT:
+   case PIPE_CAP_QUERY_PIPELINE_STATISTICS:
       return 0;
    case PIPE_CAP_VERTEX_BUFFER_OFFSET_4BYTE_ALIGNED_ONLY:
    case PIPE_CAP_VERTEX_BUFFER_STRIDE_4BYTE_ALIGNED_ONLY:
index 0a20ae3e924224eb871a094331baa55e04a0d860..53eeeb6302a49f639232618d1bf1d058d52f2365 100644 (file)
@@ -189,6 +189,8 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
       return 0;
    case PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER:
       return 1;
+   case PIPE_CAP_QUERY_PIPELINE_STATISTICS:
+      return 0;
    default:
       NOUVEAU_ERR("unknown PIPE_CAP %d\n", param);
       return 0;
index 5b9385ad7243f298383b6612ff571d594ead4e9e..3a32539d053bf30481d55451df4c0c6ff3629e47 100644 (file)
@@ -136,6 +136,7 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_QUERY_TIME_ELAPSED:
    case PIPE_CAP_OCCLUSION_QUERY:
    case PIPE_CAP_STREAM_OUTPUT_PAUSE_RESUME:
+   case PIPE_CAP_QUERY_PIPELINE_STATISTICS:
       return 1;
    case PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS:
       return 4;
index bd16c3b76b11e511286c4a17e59f006205dd580e..3175b3bdd40d287a4974c0fd24150a9c0e9b9e41 100644 (file)
@@ -135,6 +135,7 @@ static int r300_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
 
         /* Unsupported features. */
         case PIPE_CAP_QUERY_TIME_ELAPSED:
+        case PIPE_CAP_QUERY_PIPELINE_STATISTICS:
         case PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS:
         case PIPE_CAP_INDEP_BLEND_ENABLE:
         case PIPE_CAP_INDEP_BLEND_FUNC:
index 443a91eb89f5d4e23c81d7d372a7dd39582faefe..1e4c9642a0d53614d9c5c37928e6b299dd87dbd6 100644 (file)
@@ -602,6 +602,7 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
        case PIPE_CAP_VERTEX_COLOR_CLAMPED:
        case PIPE_CAP_USER_VERTEX_BUFFERS:
        case PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT:
+       case PIPE_CAP_QUERY_PIPELINE_STATISTICS:
                return 0;
 
        /* Stream output. */
index b660f9896b0b11ef68d6c4ed20879ab75044214c..17d825b1d42bf99bbc45a44f42231d2b3c499368 100644 (file)
@@ -357,6 +357,7 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
        case PIPE_CAP_TEXTURE_MULTISAMPLE:
        case PIPE_CAP_COMPUTE:
        case PIPE_CAP_QUERY_TIMESTAMP:
+       case PIPE_CAP_QUERY_PIPELINE_STATISTICS:
        case PIPE_CAP_CUBE_MAP_ARRAY:
        case PIPE_CAP_TEXTURE_BUFFER_OBJECTS:
        case PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT:
index 0261c69197c4fa283a81895e3d697cd82ccbe22b..6915f9180070c7e9a172945bbf1c03332dd12a98 100644 (file)
@@ -86,6 +86,8 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
       return 1;
    case PIPE_CAP_QUERY_TIME_ELAPSED:
       return 1;
+   case PIPE_CAP_QUERY_PIPELINE_STATISTICS:
+      return 0;
    case PIPE_CAP_TEXTURE_MIRROR_CLAMP:
       return 1;
    case PIPE_CAP_TEXTURE_SHADOW_MAP:
index 51694ea312aa5dd5505862847cacb085af98b12c..5b00acc7418a9991c8c135d400da76b39fc230da 100644 (file)
@@ -504,7 +504,8 @@ enum pipe_cap {
    PIPE_CAP_TEXTURE_BUFFER_OBJECTS = 77,
    PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT = 78,
    PIPE_CAP_TGSI_TEXCOORD = 79,
-   PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER = 80
+   PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER = 80,
+   PIPE_CAP_QUERY_PIPELINE_STATISTICS = 81
 };
 
 /**