mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-30 05:40:13 +01:00
virgl: report MIRROR_CLAMP features better
The new host version checks the support of these features better,
so report here accordingly. This fixes a number of texwrap piglit
tests on Intel.
v2: Stick to old test for PIPE_CAP_TEXTURE_MIRROR_CLAMP because
host has to be backward compatible.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25343>
This commit is contained in:
parent
733c07bba0
commit
9efe50c83b
2 changed files with 6 additions and 3 deletions
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue