mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-02 09:30:11 +01:00
virgl: Add TEXTURE_SHADOW_LOD capability support
Bind PIPE_CAP_TEXTURE_SHADOW_LOD with its value so that we are not using non-existing GLSL on host side. Rename VIRGL_CAP_FAKE_FP64 into VIRGL_CAP_HOST_IS_GLES Signed-off-by: Corentin Noël <corentin.noel@collabora.com> Reviewed-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18296>
This commit is contained in:
parent
a63a31a47b
commit
086b620793
4 changed files with 8 additions and 4 deletions
|
|
@ -101,7 +101,7 @@ static bool virgl_can_copy_transfer_from_host(struct virgl_screen *vs,
|
|||
return virgl_can_use_staging(vs, res) &&
|
||||
!is_stencil_array(res) &&
|
||||
virgl_has_readback_format(&vs->base, pipe_to_virgl_format(res->b.format), false) &&
|
||||
((!(vs->caps.caps.v2.capability_bits & VIRGL_CAP_FAKE_FP64)) ||
|
||||
((!(vs->caps.caps.v2.capability_bits & VIRGL_CAP_HOST_IS_GLES)) ||
|
||||
virgl_can_readback_from_rendertarget(vs, res) ||
|
||||
virgl_can_readback_from_scanout(vs, res, bind));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -262,7 +262,7 @@ virgl_get_param(struct pipe_screen *screen, enum pipe_cap param)
|
|||
return vscreen->caps.caps.v2.shader_buffer_offset_alignment;
|
||||
case PIPE_CAP_DOUBLES:
|
||||
return vscreen->caps.caps.v1.bset.has_fp64 ||
|
||||
(vscreen->caps.caps.v2.capability_bits & VIRGL_CAP_FAKE_FP64);
|
||||
(vscreen->caps.caps.v2.capability_bits & VIRGL_CAP_HOST_IS_GLES);
|
||||
case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS:
|
||||
return vscreen->caps.caps.v2.max_shader_patch_varyings;
|
||||
case PIPE_CAP_SAMPLER_VIEW_TARGET:
|
||||
|
|
|
|||
|
|
@ -441,7 +441,7 @@ struct tgsi_token *virgl_tgsi_transform(struct virgl_screen *vscreen, const stru
|
|||
transform.cull_enabled = vscreen->caps.caps.v1.bset.has_cull;
|
||||
transform.has_precise = vscreen->caps.caps.v2.capability_bits & VIRGL_CAP_TGSI_PRECISE;
|
||||
transform.fake_fp64 =
|
||||
vscreen->caps.caps.v2.capability_bits & VIRGL_CAP_FAKE_FP64;
|
||||
vscreen->caps.caps.v2.capability_bits & VIRGL_CAP_HOST_IS_GLES;
|
||||
transform.is_separable = is_separable && (vscreen->caps.caps.v2.capability_bits_v2 & VIRGL_CAP_V2_SSO);
|
||||
|
||||
for (int i = 0; i < ARRAY_SIZE(transform.input_temp); i++)
|
||||
|
|
|
|||
|
|
@ -438,7 +438,7 @@ enum virgl_formats {
|
|||
#define VIRGL_CAP_QBO (1 << 16)
|
||||
#define VIRGL_CAP_TRANSFER (1 << 17)
|
||||
#define VIRGL_CAP_FBO_MIXED_COLOR_FORMATS (1 << 18)
|
||||
#define VIRGL_CAP_FAKE_FP64 (1 << 19)
|
||||
#define VIRGL_CAP_HOST_IS_GLES (1 << 19)
|
||||
#define VIRGL_CAP_BIND_COMMAND_ARGS (1 << 20)
|
||||
#define VIRGL_CAP_MULTI_DRAW_INDIRECT (1 << 21)
|
||||
#define VIRGL_CAP_INDIRECT_PARAMS (1 << 22)
|
||||
|
|
@ -452,6 +452,9 @@ enum virgl_formats {
|
|||
#define VIRGL_CAP_CLEAR_TEXTURE (1 << 30)
|
||||
#define VIRGL_CAP_ARB_BUFFER_STORAGE (1u << 31)
|
||||
|
||||
// Legacy alias
|
||||
#define VIRGL_CAP_FAKE_FP64 VIRGL_CAP_HOST_IS_GLES
|
||||
|
||||
/* These are used by the capability_bits_v2 field in virgl_caps_v2. */
|
||||
#define VIRGL_CAP_V2_BLEND_EQUATION (1 << 0)
|
||||
#define VIRGL_CAP_V2_UNTYPED_RESOURCE (1 << 1)
|
||||
|
|
@ -462,6 +465,7 @@ enum virgl_formats {
|
|||
#define VIRGL_CAP_V2_COPY_TRANSFER_BOTH_DIRECTIONS (1 << 7)
|
||||
#define VIRGL_CAP_V2_SCANOUT_USES_GBM (1 << 8)
|
||||
#define VIRGL_CAP_V2_SSO (1 << 9)
|
||||
#define VIRGL_CAP_V2_TEXTURE_SHADOW_LOD (1 << 10)
|
||||
/* 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