mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 22:38:05 +02:00
zink: populate maxSampleLocationGridSize for all available sample sizes on init
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11189>
This commit is contained in:
parent
1e49018ced
commit
652db34f8a
2 changed files with 13 additions and 0 deletions
|
|
@ -1709,6 +1709,18 @@ zink_internal_create_screen(const struct pipe_screen_config *config)
|
|||
screen->base.destroy = zink_destroy_screen;
|
||||
screen->base.finalize_nir = zink_shader_finalize;
|
||||
|
||||
if (screen->info.have_EXT_sample_locations) {
|
||||
VkMultisamplePropertiesEXT prop;
|
||||
prop.sType = VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT;
|
||||
prop.pNext = NULL;
|
||||
for (unsigned i = 0; i < ARRAY_SIZE(screen->maxSampleLocationGridSize); i++) {
|
||||
if (screen->info.sample_locations_props.sampleLocationSampleCounts & (1 << i)) {
|
||||
screen->vk_GetPhysicalDeviceMultisamplePropertiesEXT(screen->pdev, 1 << i, &prop);
|
||||
screen->maxSampleLocationGridSize[i] = prop.maxSampleLocationGridSize;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!zink_screen_resource_init(&screen->base))
|
||||
goto fail;
|
||||
zink_screen_fence_init(&screen->base);
|
||||
|
|
|
|||
|
|
@ -202,6 +202,7 @@ struct zink_screen {
|
|||
|
||||
PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT vk_GetPhysicalDeviceMultisamplePropertiesEXT;
|
||||
PFN_vkCmdSetSampleLocationsEXT vk_CmdSetSampleLocationsEXT;
|
||||
VkExtent2D maxSampleLocationGridSize[5];
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue