mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 13:50:11 +01:00
virgl: Report CONSTANT_BUFFER_SIZE according to GL_MAX_UNIFORM_BLOCK_SIZE
GL_MAX_FRAGMENT_UNIFORM_COMPONENTS may not report a size that is useful to calculate the supported UBO size. Use the value GL_MAX_UNIFORM_BLOCK_SIZE instead when the host supports this. Related: https://gitlab.freedesktop.org/virgl/virglrenderer/-/issues/286 Fixes:5b683ba19avirgl: Only progagate the uniform numbers if the numbers are actually right Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18512> (cherry picked from commit95cea62a9b) Conflicts: src/virtio/virtio-gpu/virgl_hw.h
This commit is contained in:
parent
e2472db43b
commit
3ae1f0120b
3 changed files with 6 additions and 1 deletions
|
|
@ -15862,7 +15862,7 @@
|
||||||
"description": "virgl: Report CONSTANT_BUFFER_SIZE according to GL_MAX_UNIFORM_BLOCK_SIZE",
|
"description": "virgl: Report CONSTANT_BUFFER_SIZE according to GL_MAX_UNIFORM_BLOCK_SIZE",
|
||||||
"nominated": true,
|
"nominated": true,
|
||||||
"nomination_type": 1,
|
"nomination_type": 1,
|
||||||
"resolution": 0,
|
"resolution": 1,
|
||||||
"main_sha": null,
|
"main_sha": null,
|
||||||
"because_sha": "5b683ba19ac77d6c7dfd8de478678d0b90ba764f"
|
"because_sha": "5b683ba19ac77d6c7dfd8de478678d0b90ba764f"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -353,6 +353,10 @@ virgl_get_param(struct pipe_screen *screen, enum pipe_cap param)
|
||||||
return vscreen->caps.caps.v2.capability_bits_v2 & VIRGL_CAP_V2_IMPLICIT_MSAA;
|
return vscreen->caps.caps.v2.capability_bits_v2 & VIRGL_CAP_V2_IMPLICIT_MSAA;
|
||||||
case PIPE_CAP_IMAGE_STORE_FORMATTED:
|
case PIPE_CAP_IMAGE_STORE_FORMATTED:
|
||||||
return 1;
|
return 1;
|
||||||
|
case PIPE_CAP_MAX_CONSTANT_BUFFER_SIZE_UINT:
|
||||||
|
if (vscreen->caps.caps.v2.host_feature_check_version >= 13)
|
||||||
|
return vscreen->caps.caps.v2.max_uniform_block_size;
|
||||||
|
FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
return u_pipe_screen_get_param_defaults(screen, param);
|
return u_pipe_screen_get_param_defaults(screen, param);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -603,6 +603,7 @@ struct virgl_caps_v2 {
|
||||||
uint32_t max_shader_sampler_views;
|
uint32_t max_shader_sampler_views;
|
||||||
struct virgl_supported_format_mask supported_multisample_formats;
|
struct virgl_supported_format_mask supported_multisample_formats;
|
||||||
uint32_t max_const_buffer_size[6]; // PIPE_SHADER_TYPES
|
uint32_t max_const_buffer_size[6]; // PIPE_SHADER_TYPES
|
||||||
|
uint32_t max_uniform_block_size;
|
||||||
};
|
};
|
||||||
|
|
||||||
union virgl_caps {
|
union virgl_caps {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue