summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/virgl
diff options
context:
space:
mode:
authorGert Wollny <[email protected]>2018-07-03 13:32:21 +0200
committerGert Wollny <[email protected]>2018-07-20 19:15:12 +0200
commit4d094993c3247d4d627427f65e05cb686a9bfa75 (patch)
tree407bb4db55b540c3ccf9034fc8a73ca46966d9db /src/gallium/drivers/virgl
parent0bde9739c069fe24b5e5000f1b569b911847a940 (diff)
virgl: Expose GL_ARB_copy_image if host supports it
Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Gurchetan Singh <[email protected]>
Diffstat (limited to 'src/gallium/drivers/virgl')
-rw-r--r--src/gallium/drivers/virgl/virgl_hw.h1
-rw-r--r--src/gallium/drivers/virgl/virgl_screen.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/virgl/virgl_hw.h b/src/gallium/drivers/virgl/virgl_hw.h
index f501da7cc13..ee6aa68c5a7 100644
--- a/src/gallium/drivers/virgl/virgl_hw.h
+++ b/src/gallium/drivers/virgl/virgl_hw.h
@@ -202,6 +202,7 @@ enum virgl_formats {
#define VIRGL_CAP_TGSI_INVARIANT (1 << 0)
#define VIRGL_CAP_TEXTURE_VIEW (1 << 1)
#define VIRGL_CAP_SET_MIN_SAMPLES (1 << 2)
+#define VIRGL_CAP_COPY_IMAGE (1 << 3)
#define VIRGL_BIND_DEPTH_STENCIL (1 << 0)
#define VIRGL_BIND_RENDER_TARGET (1 << 1)
diff --git a/src/gallium/drivers/virgl/virgl_screen.c b/src/gallium/drivers/virgl/virgl_screen.c
index e2fe2209fe1..198acbfefbb 100644
--- a/src/gallium/drivers/virgl/virgl_screen.c
+++ b/src/gallium/drivers/virgl/virgl_screen.c
@@ -221,6 +221,8 @@ virgl_get_param(struct pipe_screen *screen, enum pipe_cap param)
return vscreen->caps.caps.v2.capability_bits & VIRGL_CAP_TEXTURE_VIEW;
case PIPE_CAP_MAX_VERTEX_ATTRIB_STRIDE:
return vscreen->caps.caps.v2.max_vertex_attrib_stride;
+ case PIPE_CAP_COPY_BETWEEN_COMPRESSED_AND_PLAIN_FORMATS:
+ return vscreen->caps.caps.v2.capability_bits & VIRGL_CAP_COPY_IMAGE;
case PIPE_CAP_TEXTURE_GATHER_SM5:
case PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENT:
case PIPE_CAP_FAKE_SW_MSAA:
@@ -247,7 +249,6 @@ virgl_get_param(struct pipe_screen *screen, enum pipe_cap param)
case PIPE_CAP_GENERATE_MIPMAP:
case PIPE_CAP_SURFACE_REINTERPRET_BLOCKS:
case PIPE_CAP_QUERY_BUFFER_OBJECT:
- case PIPE_CAP_COPY_BETWEEN_COMPRESSED_AND_PLAIN_FORMATS:
case PIPE_CAP_STRING_MARKER:
case PIPE_CAP_QUERY_MEMORY_INFO:
case PIPE_CAP_PCI_GROUP: