virgl: Check texture multisample compatibility
v2: Support VIRGL_FORMAT_NONE (Gert Wollny) Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com> Suggested-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15115>
This commit is contained in:
parent
571c5e8fdc
commit
b70f14188d
|
@ -42,6 +42,7 @@
|
|||
#define CONV_FORMAT(f) [PIPE_FORMAT_##f] = VIRGL_FORMAT_##f,
|
||||
|
||||
static const enum virgl_formats virgl_formats_conv_table[PIPE_FORMAT_COUNT] = {
|
||||
CONV_FORMAT(NONE)
|
||||
CONV_FORMAT(B8G8R8A8_UNORM)
|
||||
CONV_FORMAT(B8G8R8X8_UNORM)
|
||||
CONV_FORMAT(A8R8G8B8_UNORM)
|
||||
|
|
|
@ -700,6 +700,11 @@ virgl_is_format_supported( struct pipe_screen *screen,
|
|||
|
||||
if (sample_count > caps->v1.max_samples)
|
||||
return false;
|
||||
|
||||
if (caps->v2.host_feature_check_version >= 9 &&
|
||||
!has_format_bit(&caps->v2.supported_multisample_formats,
|
||||
pipe_to_virgl_format(format)))
|
||||
return false;
|
||||
}
|
||||
|
||||
if (bind & PIPE_BIND_VERTEX_BUFFER) {
|
||||
|
|
|
@ -600,6 +600,7 @@ struct virgl_caps_v2 {
|
|||
char renderer[64];
|
||||
float max_anisotropy;
|
||||
uint32_t max_shader_sampler_views;
|
||||
struct virgl_supported_format_mask supported_multisample_formats;
|
||||
};
|
||||
|
||||
union virgl_caps {
|
||||
|
|
Loading…
Reference in New Issue