gallium: add PIPE_CAP_QUERY_BUFFER_OBJECT
authorIlia Mirkin <imirkin@alum.mit.edu>
Sun, 10 Jan 2016 04:30:16 +0000 (23:30 -0500)
committerIlia Mirkin <imirkin@alum.mit.edu>
Fri, 5 Feb 2016 02:21:30 +0000 (21:21 -0500)
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
15 files changed:
src/gallium/docs/source/screen.rst
src/gallium/drivers/freedreno/freedreno_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/drivers/virgl/virgl_screen.c
src/gallium/include/pipe/p_defines.h

index c95136fe425f8717891f6ac215c0c6e7f46766cb..3324bcca6f463563a1cfc2d60ef2055c4567ece8 100644 (file)
@@ -317,6 +317,8 @@ The integer capabilities:
   non-compressed surface whose texels are the same number of bits as the
   compressed blocks, and vice versa. The width and height of the surface is
   adjusted appropriately.
+* ``PIPE_CAP_QUERY_BUFFER_OBJECT``: Driver supports
+  context::get_query_result_resource callback.
 
 
 .. _pipe_capf:
index e4352b1a9a5c0116262ae658eab95ea276ff5a45..f67c1604c67d82c43e291d846df41f6788c0102f 100644 (file)
@@ -299,6 +299,7 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
        /* Queries. */
        case PIPE_CAP_QUERY_TIME_ELAPSED:
        case PIPE_CAP_QUERY_TIMESTAMP:
+       case PIPE_CAP_QUERY_BUFFER_OBJECT:
                return 0;
        case PIPE_CAP_OCCLUSION_QUERY:
                return is_a3xx(screen) || is_a4xx(screen);
index b81057bf82d30e3a9b7bcfd49e0fb537ff71baea..7c77197156eb0b25369ba873c4e598030eac36b9 100644 (file)
@@ -489,6 +489,7 @@ ilo_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_GENERATE_MIPMAP:
    case PIPE_CAP_STRING_MARKER:
    case PIPE_CAP_SURFACE_REINTERPRET_BLOCKS:
+   case PIPE_CAP_QUERY_BUFFER_OBJECT:
       return 0;
 
    case PIPE_CAP_VENDOR_ID:
index 1d08abd26a7f95e3f2e97c287775d8aa0a4975dc..17316816c70eb6ac0e7aac88e86fd0e145b35c66 100644 (file)
@@ -313,6 +313,7 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_STRING_MARKER:
    case PIPE_CAP_BUFFER_SAMPLER_VIEW_RGBA_ONLY:
    case PIPE_CAP_SURFACE_REINTERPRET_BLOCKS:
+   case PIPE_CAP_QUERY_BUFFER_OBJECT:
       return 0;
    }
    /* should only get here on unhandled cases */
index 851b7b915b826c51c691a0dd25c1fa98dbc92fab..4f09b74b8e377c93381b1ebd76f5aade74e7072f 100644 (file)
@@ -186,6 +186,7 @@ nv30_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_STRING_MARKER:
    case PIPE_CAP_BUFFER_SAMPLER_VIEW_RGBA_ONLY:
    case PIPE_CAP_SURFACE_REINTERPRET_BLOCKS:
+   case PIPE_CAP_QUERY_BUFFER_OBJECT:
       return 0;
 
    case PIPE_CAP_VENDOR_ID:
index c74df23f6e20f94a7dc2edb837f05ff40d9ff769..e0b93b7edee33d1e0c6bed0ff6f6151d5435abcb 100644 (file)
@@ -229,6 +229,7 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_STRING_MARKER:
    case PIPE_CAP_BUFFER_SAMPLER_VIEW_RGBA_ONLY:
    case PIPE_CAP_SURFACE_REINTERPRET_BLOCKS:
+   case PIPE_CAP_QUERY_BUFFER_OBJECT:
       return 0;
 
    case PIPE_CAP_VENDOR_ID:
index a9bde273ac668754029164d6ce59e9a658305524..17ea94360e6391dfc0ca5b3e2a94169b978e9769 100644 (file)
@@ -219,6 +219,7 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_STRING_MARKER:
    case PIPE_CAP_BUFFER_SAMPLER_VIEW_RGBA_ONLY:
    case PIPE_CAP_SURFACE_REINTERPRET_BLOCKS:
+   case PIPE_CAP_QUERY_BUFFER_OBJECT:
       return 0;
 
    case PIPE_CAP_VENDOR_ID:
index acc32b9af4dfdbca27882d789ef275866d643aea..cca5936258dacf1b437f4f358c88c51152d9ad8f 100644 (file)
@@ -212,6 +212,7 @@ static int r300_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
         case PIPE_CAP_STRING_MARKER:
         case PIPE_CAP_BUFFER_SAMPLER_VIEW_RGBA_ONLY:
         case PIPE_CAP_SURFACE_REINTERPRET_BLOCKS:
+        case PIPE_CAP_QUERY_BUFFER_OBJECT:
             return 0;
 
         /* SWTCL-only features. */
index c6127d75a9a39482df3aef7624e9b19926aeab50..0129750e9267ef26efa84860a93c365b371081b3 100644 (file)
@@ -368,6 +368,7 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
        case PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT:
        case PIPE_CAP_GENERATE_MIPMAP:
        case PIPE_CAP_STRING_MARKER:
+       case PIPE_CAP_QUERY_BUFFER_OBJECT:
                return 0;
 
        case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS:
index 8cf251b11aeb1f043d255ab2909a98c8c484a8ef..f564f019ed9be01c90151bf17d6561fe7271178d 100644 (file)
@@ -360,6 +360,7 @@ static int si_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
        case PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT:
        case PIPE_CAP_GENERATE_MIPMAP:
        case PIPE_CAP_STRING_MARKER:
+       case PIPE_CAP_QUERY_BUFFER_OBJECT:
                return 0;
 
        case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS:
index 5bb623f9258dd914bc37d5c77c3f8029c8062e01..1738cae8c1807dd886a88d4bd06f28959c40d3ed 100644 (file)
@@ -264,6 +264,7 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_GENERATE_MIPMAP:
    case PIPE_CAP_STRING_MARKER:
    case PIPE_CAP_SURFACE_REINTERPRET_BLOCKS:
+   case PIPE_CAP_QUERY_BUFFER_OBJECT:
       return 0;
    }
    /* should only get here on unhandled cases */
index 73d90d180fdad1a895cb5e41674e873a93778933..eeed59c6dc04c702be040913cf66b5bb23917867 100644 (file)
@@ -398,6 +398,7 @@ svga_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_TGSI_FS_POSITION_IS_SYSVAL:
    case PIPE_CAP_TGSI_FS_FACE_IS_INTEGER_SYSVAL:
    case PIPE_CAP_BUFFER_SAMPLER_VIEW_RGBA_ONLY:
+   case PIPE_CAP_QUERY_BUFFER_OBJECT:
       return 0;
    }
 
index 641433a76fed768b30441d0ba7aaa7fd78b61ad0..371f662ab1d8a9d024996aad906331c8ae13d967 100644 (file)
@@ -201,6 +201,7 @@ vc4_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
         case PIPE_CAP_GENERATE_MIPMAP:
         case PIPE_CAP_STRING_MARKER:
         case PIPE_CAP_SURFACE_REINTERPRET_BLOCKS:
+        case PIPE_CAP_QUERY_BUFFER_OBJECT:
                 return 0;
 
                 /* Stream output. */
index 5036e1dedb5c5a4bb5b639a8aa62cb1e2dbdee23..18263e91e6aed283bfaf2dbab2114d97090044b9 100644 (file)
@@ -231,6 +231,7 @@ virgl_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_INVALIDATE_BUFFER:
    case PIPE_CAP_GENERATE_MIPMAP:
    case PIPE_CAP_SURFACE_REINTERPRET_BLOCKS:
+   case PIPE_CAP_QUERY_BUFFER_OBJECT:
       return 0;
    case PIPE_CAP_VENDOR_ID:
       return 0x1af4;
index fb845520afc5e5d588a7f194c478a0bc84612a5e..75b9bf930b0e8bd4cd364f3a59cb03c4c48639ad 100644 (file)
@@ -650,6 +650,7 @@ enum pipe_cap
    PIPE_CAP_GENERATE_MIPMAP,
    PIPE_CAP_STRING_MARKER,
    PIPE_CAP_SURFACE_REINTERPRET_BLOCKS,
+   PIPE_CAP_QUERY_BUFFER_OBJECT,
 };
 
 #define PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_NV50 (1 << 0)