mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 02:48:06 +02:00
nvk: Fix support for VK_EXT_sample_locations
Fixes some crashes on sample locations pipeline tests. The implementation was already there but the device properties were missing. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24592>
This commit is contained in:
parent
2dc883eb37
commit
2de545c68f
1 changed files with 27 additions and 4 deletions
|
|
@ -371,10 +371,10 @@ nvk_get_device_properties(const struct nvk_instance *instance,
|
||||||
const struct nv_device_info *info,
|
const struct nv_device_info *info,
|
||||||
struct vk_properties *properties)
|
struct vk_properties *properties)
|
||||||
{
|
{
|
||||||
VkSampleCountFlagBits sample_counts = VK_SAMPLE_COUNT_1_BIT |
|
const VkSampleCountFlagBits sample_counts = VK_SAMPLE_COUNT_1_BIT |
|
||||||
VK_SAMPLE_COUNT_2_BIT |
|
VK_SAMPLE_COUNT_2_BIT |
|
||||||
VK_SAMPLE_COUNT_4_BIT |
|
VK_SAMPLE_COUNT_4_BIT |
|
||||||
VK_SAMPLE_COUNT_8_BIT;
|
VK_SAMPLE_COUNT_8_BIT;
|
||||||
|
|
||||||
*properties = (struct vk_properties) {
|
*properties = (struct vk_properties) {
|
||||||
.apiVersion = VK_MAKE_VERSION(1, 0, VK_HEADER_VERSION),
|
.apiVersion = VK_MAKE_VERSION(1, 0, VK_HEADER_VERSION),
|
||||||
|
|
@ -585,6 +585,14 @@ nvk_get_device_properties(const struct nvk_instance *instance,
|
||||||
.robustStorageBufferAccessSizeAlignment = NVK_SSBO_BOUNDS_CHECK_ALIGNMENT,
|
.robustStorageBufferAccessSizeAlignment = NVK_SSBO_BOUNDS_CHECK_ALIGNMENT,
|
||||||
.robustUniformBufferAccessSizeAlignment = NVK_MIN_UBO_ALIGNMENT,
|
.robustUniformBufferAccessSizeAlignment = NVK_MIN_UBO_ALIGNMENT,
|
||||||
|
|
||||||
|
/* VK_EXT_sample_locations */
|
||||||
|
.sampleLocationSampleCounts = sample_counts,
|
||||||
|
.maxSampleLocationGridSize = (VkExtent2D){ 1, 1 },
|
||||||
|
.sampleLocationCoordinateRange[0] = 0.0f,
|
||||||
|
.sampleLocationCoordinateRange[1] = 0.9375f,
|
||||||
|
.sampleLocationSubPixelBits = 4,
|
||||||
|
.variableSampleLocations = true,
|
||||||
|
|
||||||
/* VK_EXT_transform_feedback */
|
/* VK_EXT_transform_feedback */
|
||||||
.maxTransformFeedbackStreams = 4,
|
.maxTransformFeedbackStreams = 4,
|
||||||
.maxTransformFeedbackBuffers = 4,
|
.maxTransformFeedbackBuffers = 4,
|
||||||
|
|
@ -866,3 +874,18 @@ nvk_GetPhysicalDeviceQueueFamilyProperties2(
|
||||||
p->queueFamilyProperties.minImageTransferGranularity = (VkExtent3D){1, 1, 1};
|
p->queueFamilyProperties.minImageTransferGranularity = (VkExtent3D){1, 1, 1};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VKAPI_ATTR void VKAPI_CALL
|
||||||
|
nvk_GetPhysicalDeviceMultisamplePropertiesEXT(
|
||||||
|
VkPhysicalDevice physicalDevice,
|
||||||
|
VkSampleCountFlagBits samples,
|
||||||
|
VkMultisamplePropertiesEXT *pMultisampleProperties)
|
||||||
|
{
|
||||||
|
VK_FROM_HANDLE(nvk_physical_device, pdev, physicalDevice);
|
||||||
|
|
||||||
|
if (samples & pdev->vk.properties.sampleLocationSampleCounts) {
|
||||||
|
pMultisampleProperties->maxSampleLocationGridSize = (VkExtent2D){1, 1};
|
||||||
|
} else {
|
||||||
|
pMultisampleProperties->maxSampleLocationGridSize = (VkExtent2D){0, 0};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue