v3dv: honor VkPhysicalDeviceFeatures2 in pNext chain of VkDeviceCreateInfo

Fixes:
dEQP-VK.robustness.buffer_access.through_pointers.*.reads.*

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12718>
This commit is contained in:
Iago Toral Quiroga 2021-09-03 12:15:03 +02:00
parent 9b6c641cb5
commit 38d79d00a1
2 changed files with 14 additions and 6 deletions

View file

@ -1,6 +1,4 @@
dEQP-VK.api.external.fence.opaque_fd.reset_permanent
dEQP-VK.api.external.fence.opaque_fd.reset_temporary
dEQP-VK.robustness.buffer_access.through_pointers.compute.*out_of_memory_with_.*
dEQP-VK.robustness.buffer_access.through_pointers.graphics.*out_of_memory_with_.*
dEQP-VK.ssbo.layout.instance_array_basic_type.std430.uvec4
dEQP-VK.wsi.display.get_display_plane_capabilities

View file

@ -1762,14 +1762,24 @@ v3dv_CreateDevice(VkPhysicalDevice physicalDevice,
device->devinfo = physical_device->devinfo;
if (pCreateInfo->pEnabledFeatures) {
/* Vulkan 1.1 and VK_KHR_get_physical_device_properties2 added
* VkPhysicalDeviceFeatures2 which can be used in the pNext chain of
* vkDeviceCreateInfo, in which case it should be used instead of
* pEnabledFeatures.
*/
const VkPhysicalDeviceFeatures2 *features2 =
vk_find_struct_const(pCreateInfo->pNext, PHYSICAL_DEVICE_FEATURES_2);
if (features2) {
memcpy(&device->features, &features2->features,
sizeof(device->features));
} else if (pCreateInfo->pEnabledFeatures) {
memcpy(&device->features, pCreateInfo->pEnabledFeatures,
sizeof(device->features));
if (device->features.robustBufferAccess)
perf_debug("Device created with Robust Buffer Access enabled.\n");
}
if (device->features.robustBufferAccess)
perf_debug("Device created with Robust Buffer Access enabled.\n");
int ret = drmSyncobjCreate(physical_device->render_fd,
DRM_SYNCOBJ_CREATE_SIGNALED,
&device->last_job_sync);