diff --git a/src/gallium/drivers/virgl/virgl_screen.c b/src/gallium/drivers/virgl/virgl_screen.c index ca1913035df..36580e7efe1 100644 --- a/src/gallium/drivers/virgl/virgl_screen.c +++ b/src/gallium/drivers/virgl/virgl_screen.c @@ -92,11 +92,13 @@ virgl_get_param(struct pipe_screen *screen, enum pipe_cap param) return vscreen->caps.caps.v1.max_dual_source_render_targets; case PIPE_CAP_OCCLUSION_QUERY: return vscreen->caps.caps.v1.bset.occlusion_query; + case PIPE_CAP_TEXTURE_MIRROR_CLAMP_TO_EDGE: + if (vscreen->caps.caps.v2.host_feature_check_version >= 20) + return vscreen->caps.caps.v2.capability_bits_v2 & VIRGL_CAP_V2_MIRROR_CLAMP_TO_EDGE; + FALLTHROUGH; case PIPE_CAP_TEXTURE_MIRROR_CLAMP: return vscreen->caps.caps.v1.bset.mirror_clamp && - vscreen->caps.caps.v2.capability_bits & VIRGL_CAP_HOST_IS_GLES ? 0 : 1; - case PIPE_CAP_TEXTURE_MIRROR_CLAMP_TO_EDGE: - return vscreen->caps.caps.v1.bset.mirror_clamp; + (vscreen->caps.caps.v2.capability_bits & VIRGL_CAP_HOST_IS_GLES); case PIPE_CAP_TEXTURE_SWIZZLE: return 1; case PIPE_CAP_MAX_TEXTURE_2D_SIZE: diff --git a/src/virtio/virtio-gpu/virgl_hw.h b/src/virtio/virtio-gpu/virgl_hw.h index b1d9cb2e007..e2340df1e9d 100644 --- a/src/virtio/virtio-gpu/virgl_hw.h +++ b/src/virtio/virtio-gpu/virgl_hw.h @@ -585,6 +585,7 @@ enum virgl_formats { #define VIRGL_CAP_V2_PIPELINE_STATISTICS_QUERY (1 << 13) #define VIRGL_CAP_V2_DRAW_PARAMETERS (1 << 14) #define VIRGL_CAP_V2_GROUP_VOTE (1 << 15) +#define VIRGL_CAP_V2_MIRROR_CLAMP_TO_EDGE (1 << 16) /* virgl bind flags - these are compatible with mesa 10.5 gallium. * but are fixed, no other should be passed to virgl either.