Module: Mesa Branch: main Commit: 59000decf4456bf5f3944c2c42a8be6fc2842d48 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=59000decf4456bf5f3944c2c42a8be6fc2842d48
Author: Faith Ekstrand <[email protected]> Date: Mon Sep 25 16:57:42 2023 -0500 nvk: Re-order physical device limits They now match the order in vulkan_core.h which makes it easier to find missing entries of which there was one. This also fixes a bug where we were setting .bufferImageGranularity twice and we were overwriting the correct value with an incorrect one. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25383> --- src/nouveau/vulkan/nvk_physical_device.c | 118 +++++++++++++++---------------- 1 file changed, 59 insertions(+), 59 deletions(-) diff --git a/src/nouveau/vulkan/nvk_physical_device.c b/src/nouveau/vulkan/nvk_physical_device.c index 8fc19d3f173..257097da046 100644 --- a/src/nouveau/vulkan/nvk_physical_device.c +++ b/src/nouveau/vulkan/nvk_physical_device.c @@ -390,43 +390,19 @@ nvk_get_device_properties(const struct nvk_instance *instance, VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU, /* Vulkan 1.0 limits */ - .maxImageArrayLayers = 2048, .maxImageDimension1D = nvk_image_max_dimension(info, VK_IMAGE_TYPE_1D), .maxImageDimension2D = nvk_image_max_dimension(info, VK_IMAGE_TYPE_2D), .maxImageDimension3D = nvk_image_max_dimension(info, VK_IMAGE_TYPE_3D), .maxImageDimensionCube = 0x8000, + .maxImageArrayLayers = 2048, + .maxTexelBufferElements = 128 * 1024 * 1024, + .maxUniformBufferRange = 65536, + .maxStorageBufferRange = UINT32_MAX, .maxPushConstantsSize = NVK_MAX_PUSH_SIZE, .maxMemoryAllocationCount = 1024, - .bufferImageGranularity = info->chipset >= 0x120 ? 0x400 : 0x10000, - .maxFramebufferHeight = info->chipset >= 0x130 ? 0x8000 : 0x4000, - .maxFramebufferWidth = info->chipset >= 0x130 ? 0x8000 : 0x4000, - .maxFramebufferLayers = 2048, - .maxColorAttachments = NVK_MAX_RTS, - .maxClipDistances = 8, - .maxCullDistances = 8, - .maxCombinedClipAndCullDistances = 8, - .maxFragmentCombinedOutputResources = 16, - .maxFragmentInputComponents = 128, - .maxFragmentOutputAttachments = NVK_MAX_RTS, - .maxFragmentDualSrcAttachments = 1, .maxSamplerAllocationCount = 4000, - .maxSamplerLodBias = 15, - .maxSamplerAnisotropy = 16, - .maxSampleMaskWords = 1, - .minTexelGatherOffset = -32, - .minTexelOffset = -8, - .maxTexelGatherOffset = 31, - .maxTexelOffset = 7, - .minInterpolationOffset = -0.5, - .maxInterpolationOffset = 0.4375, - .mipmapPrecisionBits = 8, - .subPixelInterpolationOffsetBits = 4, - .subPixelPrecisionBits = 8, - .subTexelPrecisionBits = 8, - .viewportSubPixelBits = 8, - .maxUniformBufferRange = 65536, - .maxStorageBufferRange = UINT32_MAX, - .maxTexelBufferElements = 128 * 1024 * 1024, + .bufferImageGranularity = info->chipset >= 0x120 ? 0x400 : 0x10000, + .sparseAddressSpaceSize = UINT32_MAX, .maxBoundDescriptorSets = NVK_MAX_SETS, .maxPerStageDescriptorSamplers = UINT32_MAX, .maxPerStageDescriptorUniformBuffers = UINT32_MAX, @@ -443,31 +419,10 @@ nvk_get_device_properties(const struct nvk_instance *instance, .maxDescriptorSetSampledImages = UINT32_MAX, .maxDescriptorSetStorageImages = UINT32_MAX, .maxDescriptorSetInputAttachments = UINT32_MAX, - .maxComputeSharedMemorySize = 49152, - .maxComputeWorkGroupCount = {0x7fffffff, 65535, 65535}, - .maxComputeWorkGroupInvocations = 1024, - .maxComputeWorkGroupSize = {1024, 1024, 64}, - .maxViewports = NVK_MAX_VIEWPORTS, - .maxViewportDimensions = { 32768, 32768 }, - .viewportBoundsRange = { -65536, 65536 }, - .pointSizeRange = { 1.0, 2047.94 }, - .pointSizeGranularity = 0.0625, - .lineWidthRange = { 1, 64 }, - .lineWidthGranularity = 0.0625, - .nonCoherentAtomSize = 64, - .minMemoryMapAlignment = 64, - .minUniformBufferOffsetAlignment = - nvk_get_buffer_alignment(info, VK_BUFFER_USAGE_2_UNIFORM_BUFFER_BIT_KHR, 0), - .minTexelBufferOffsetAlignment = - nvk_get_buffer_alignment(info, VK_BUFFER_USAGE_2_UNIFORM_TEXEL_BUFFER_BIT_KHR | - VK_BUFFER_USAGE_2_STORAGE_TEXEL_BUFFER_BIT_KHR, - 0), - .minStorageBufferOffsetAlignment = - nvk_get_buffer_alignment(info, VK_BUFFER_USAGE_2_STORAGE_BUFFER_BIT_KHR, 0), - .maxVertexInputAttributeOffset = 2047, .maxVertexInputAttributes = 32, - .maxVertexInputBindingStride = 2048, .maxVertexInputBindings = 32, + .maxVertexInputAttributeOffset = 2047, + .maxVertexInputBindingStride = 2048, .maxVertexOutputComponents = 128, .maxTessellationGenerationLevel = 64, .maxTessellationPatchSize = 32, @@ -482,25 +437,70 @@ nvk_get_device_properties(const struct nvk_instance *instance, .maxGeometryOutputComponents = 128, .maxGeometryOutputVertices = 1024, .maxGeometryTotalOutputComponents = 1024, + .maxFragmentInputComponents = 128, + .maxFragmentOutputAttachments = NVK_MAX_RTS, + .maxFragmentDualSrcAttachments = 1, + .maxFragmentCombinedOutputResources = 16, + .maxComputeSharedMemorySize = 49152, + .maxComputeWorkGroupCount = {0x7fffffff, 65535, 65535}, + .maxComputeWorkGroupInvocations = 1024, + .maxComputeWorkGroupSize = {1024, 1024, 64}, + .subPixelPrecisionBits = 8, + .subTexelPrecisionBits = 8, + .mipmapPrecisionBits = 8, .maxDrawIndexedIndexValue = UINT32_MAX, .maxDrawIndirectCount = UINT32_MAX, - .timestampComputeAndGraphics = true, - .timestampPeriod = 1, + .maxSamplerLodBias = 15, + .maxSamplerAnisotropy = 16, + .maxViewports = NVK_MAX_VIEWPORTS, + .maxViewportDimensions = { 32768, 32768 }, + .viewportBoundsRange = { -65536, 65536 }, + .viewportSubPixelBits = 8, + .minMemoryMapAlignment = 64, + .minTexelBufferOffsetAlignment = + nvk_get_buffer_alignment(info, VK_BUFFER_USAGE_2_UNIFORM_TEXEL_BUFFER_BIT_KHR | + VK_BUFFER_USAGE_2_STORAGE_TEXEL_BUFFER_BIT_KHR, + 0), + .minUniformBufferOffsetAlignment = + nvk_get_buffer_alignment(info, VK_BUFFER_USAGE_2_UNIFORM_BUFFER_BIT_KHR, 0), + .minStorageBufferOffsetAlignment = + nvk_get_buffer_alignment(info, VK_BUFFER_USAGE_2_STORAGE_BUFFER_BIT_KHR, 0), + .minTexelOffset = -8, + .maxTexelOffset = 7, + .minTexelGatherOffset = -32, + .maxTexelGatherOffset = 31, + .minInterpolationOffset = -0.5, + .maxInterpolationOffset = 0.4375, + .subPixelInterpolationOffsetBits = 4, + .maxFramebufferHeight = info->chipset >= 0x130 ? 0x8000 : 0x4000, + .maxFramebufferWidth = info->chipset >= 0x130 ? 0x8000 : 0x4000, + .maxFramebufferLayers = 2048, .framebufferColorSampleCounts = sample_counts, .framebufferDepthSampleCounts = sample_counts, .framebufferNoAttachmentsSampleCounts = sample_counts, .framebufferStencilSampleCounts = sample_counts, + .maxColorAttachments = NVK_MAX_RTS, .sampledImageColorSampleCounts = sample_counts, - .sampledImageDepthSampleCounts = sample_counts, .sampledImageIntegerSampleCounts = sample_counts, + .sampledImageDepthSampleCounts = sample_counts, .sampledImageStencilSampleCounts = sample_counts, .storageImageSampleCounts = VK_SAMPLE_COUNT_1_BIT, - .standardSampleLocations = true, + .maxSampleMaskWords = 1, + .timestampComputeAndGraphics = true, + .timestampPeriod = 1, + .maxClipDistances = 8, + .maxCullDistances = 8, + .maxCombinedClipAndCullDistances = 8, + /* discreteQueuePriorities */ + .pointSizeRange = { 1.0, 2047.94 }, + .lineWidthRange = { 1, 64 }, + .pointSizeGranularity = 0.0625, + .lineWidthGranularity = 0.0625, .strictLines = true, + .standardSampleLocations = true, .optimalBufferCopyOffsetAlignment = 1, .optimalBufferCopyRowPitchAlignment = 1, - .bufferImageGranularity = 1, - .sparseAddressSpaceSize = UINT32_MAX, + .nonCoherentAtomSize = 64, /* Vulkan 1.0 sparse properties */ .sparseResidencyNonResidentStrict = true,
