VkFormatFeatureFlags optimalTilingFeatures;
} VkFormatProperties;
+typedef struct {
+ uint32_t maxImageDimension1D;
+ uint32_t maxImageDimension2D;
+ uint32_t maxImageDimension3D;
+ uint32_t maxImageDimensionCube;
+ uint32_t maxImageArrayLayers;
+ uint32_t maxTexelBufferSize;
+ uint32_t maxUniformBufferSize;
+ uint32_t maxStorageBufferSize;
+ uint32_t maxPushConstantsSize;
+ uint32_t maxMemoryAllocationCount;
+ uint32_t maxBoundDescriptorSets;
+ uint32_t maxDescriptorSets;
+ uint32_t maxPerStageDescriptorSamplers;
+ uint32_t maxPerStageDescriptorUniformBuffers;
+ uint32_t maxPerStageDescriptorStorageBuffers;
+ uint32_t maxPerStageDescriptorSampledImages;
+ uint32_t maxPerStageDescriptorStorageImages;
+ uint32_t maxDescriptorSetSamplers;
+ uint32_t maxDescriptorSetUniformBuffers;
+ uint32_t maxDescriptorSetStorageBuffers;
+ uint32_t maxDescriptorSetSampledImages;
+ uint32_t maxDescriptorSetStorageImages;
+ uint32_t maxVertexInputAttributes;
+ uint32_t maxVertexInputAttributeOffset;
+ uint32_t maxVertexInputBindingStride;
+ uint32_t maxVertexOutputComponents;
+ uint32_t maxTessGenLevel;
+ uint32_t maxTessPatchSize;
+ uint32_t maxTessControlPerVertexInputComponents;
+ uint32_t maxTessControlPerVertexOutputComponents;
+ uint32_t maxTessControlPerPatchOutputComponents;
+ uint32_t maxTessControlTotalOutputComponents;
+ uint32_t maxTessEvaluationInputComponents;
+ uint32_t maxTessEvaluationOutputComponents;
+ uint32_t maxGeometryShaderInvocations;
+ uint32_t maxGeometryInputComponents;
+ uint32_t maxGeometryOutputComponents;
+ uint32_t maxGeometryOutputVertices;
+ uint32_t maxGeometryTotalOutputComponents;
+ uint32_t maxFragmentInputComponents;
+ uint32_t maxFragmentOutputBuffers;
+ uint32_t maxFragmentDualSourceBuffers;
+ uint32_t maxFragmentCombinedOutputResources;
+ uint32_t maxComputeSharedMemorySize;
+ uint32_t maxComputeWorkGroupCount[3];
+ uint32_t maxComputeWorkGroupInvocations;
+ uint32_t maxComputeWorkGroupSize[3];
+ uint32_t subPixelPrecisionBits;
+ uint32_t subTexelPrecisionBits;
+ uint32_t mipmapPrecisionBits;
+ uint32_t maxDrawIndexedIndexValue;
+ uint32_t maxDrawIndirectInstanceCount;
+ bool32_t primitiveRestartForPatches;
+ float maxSamplerLodBias;
+ uint32_t maxSamplerAnisotropy;
+ uint32_t maxViewports;
+ uint32_t maxDynamicViewportStates;
+ uint32_t maxViewportDimensions[2];
+ float viewportBoundsRange[2];
+ uint32_t viewportSubPixelBits;
+ uint32_t minMemoryMapAlignment;
+ uint32_t minTexelBufferOffsetAlignment;
+ uint32_t minUniformBufferOffsetAlignment;
+ uint32_t minStorageBufferOffsetAlignment;
+ uint32_t minTexelOffset;
+ uint32_t maxTexelOffset;
+ uint32_t minTexelGatherOffset;
+ uint32_t maxTexelGatherOffset;
+ float minInterpolationOffset;
+ float maxInterpolationOffset;
+ uint32_t subPixelInterpolationOffsetBits;
+ uint32_t maxFramebufferWidth;
+ uint32_t maxFramebufferHeight;
+ uint32_t maxFramebufferLayers;
+ uint32_t maxFramebufferColorSamples;
+ uint32_t maxFramebufferDepthSamples;
+ uint32_t maxFramebufferStencilSamples;
+ uint32_t maxColorAttachments;
+ uint32_t maxSampledImageColorSamples;
+ uint32_t maxSampledImageDepthSamples;
+ uint32_t maxSampledImageIntegerSamples;
+ uint32_t maxStorageImageSamples;
+ uint32_t maxSampleMaskWords;
+ uint64_t timestampFrequency;
+ uint32_t maxClipDistances;
+ uint32_t maxCullDistances;
+ uint32_t maxCombinedClipAndCullDistances;
+ float pointSizeRange[2];
+ float lineWidthRange[2];
+ float pointSizeGranularity;
+ float lineWidthGranularity;
+} VkPhysicalDeviceLimits;
+
typedef struct {
uint32_t apiVersion;
uint32_t driverVersion;
typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceFeatures)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures* pFeatures);
typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceInfo)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceInfoType infoType, size_t* pDataSize, void* pData);
typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceFormatInfo)(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties* pFormatInfo);
+typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceLimits)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceLimits* pLimits);
typedef PFN_vkVoidFunction (VKAPI *PFN_vkGetInstanceProcAddr)(VkInstance instance, const char* pName);
typedef PFN_vkVoidFunction (VKAPI *PFN_vkGetDeviceProcAddr)(VkDevice device, const char* pName);
typedef VkResult (VKAPI *PFN_vkCreateDevice)(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo* pCreateInfo, VkDevice* pDevice);
VkFormat format,
VkFormatProperties* pFormatInfo);
+VkResult VKAPI vkGetPhysicalDeviceLimits(
+ VkPhysicalDevice physicalDevice,
+ VkPhysicalDeviceLimits* pLimits);
+
PFN_vkVoidFunction VKAPI vkGetInstanceProcAddr(
VkInstance instance,
const char* pName);
return VK_SUCCESS;
}
+VkResult anv_GetPhysicalDeviceLimits(
+ VkPhysicalDevice physicalDevice,
+ VkPhysicalDeviceLimits* pLimits)
+{
+ ANV_FROM_HANDLE(anv_physical_device, physical_device, physicalDevice);
+ const struct brw_device_info *devinfo = physical_device->info;
+
+ anv_finishme("Get correct values for PhysicalDeviceLimits");
+
+ *pLimits = (VkPhysicalDeviceLimits) {
+ .maxImageDimension1D = (1 << 14),
+ .maxImageDimension2D = (1 << 14),
+ .maxImageDimension3D = (1 << 10),
+ .maxImageDimensionCube = (1 << 14),
+ .maxImageArrayLayers = (1 << 10),
+ .maxTexelBufferSize = (1 << 14),
+ .maxUniformBufferSize = UINT32_MAX,
+ .maxStorageBufferSize = UINT32_MAX,
+ .maxPushConstantsSize = 128,
+ .maxMemoryAllocationCount = UINT32_MAX,
+ .maxBoundDescriptorSets = MAX_SETS,
+ .maxDescriptorSets = UINT32_MAX,
+ .maxPerStageDescriptorSamplers = 64,
+ .maxPerStageDescriptorUniformBuffers = 64,
+ .maxPerStageDescriptorStorageBuffers = 64,
+ .maxPerStageDescriptorSampledImages = 64,
+ .maxPerStageDescriptorStorageImages = 64,
+ .maxDescriptorSetSamplers = 256,
+ .maxDescriptorSetUniformBuffers = 256,
+ .maxDescriptorSetStorageBuffers = 256,
+ .maxDescriptorSetSampledImages = 256,
+ .maxDescriptorSetStorageImages = 256,
+ .maxVertexInputAttributes = 32,
+ .maxVertexInputAttributeOffset = 256,
+ .maxVertexInputBindingStride = 256,
+ .maxVertexOutputComponents = 32,
+ .maxTessGenLevel = 0,
+ .maxTessPatchSize = 0,
+ .maxTessControlPerVertexInputComponents = 0,
+ .maxTessControlPerVertexOutputComponents = 0,
+ .maxTessControlPerPatchOutputComponents = 0,
+ .maxTessControlTotalOutputComponents = 0,
+ .maxTessEvaluationInputComponents = 0,
+ .maxTessEvaluationOutputComponents = 0,
+ .maxGeometryShaderInvocations = 6,
+ .maxGeometryInputComponents = 16,
+ .maxGeometryOutputComponents = 16,
+ .maxGeometryOutputVertices = 16,
+ .maxGeometryTotalOutputComponents = 16,
+ .maxFragmentInputComponents = 16,
+ .maxFragmentOutputBuffers = 8,
+ .maxFragmentDualSourceBuffers = 2,
+ .maxFragmentCombinedOutputResources = 8,
+ .maxComputeSharedMemorySize = 1024,
+ .maxComputeWorkGroupCount = {
+ 16 * devinfo->max_cs_threads,
+ 16 * devinfo->max_cs_threads,
+ 16 * devinfo->max_cs_threads,
+ },
+ .maxComputeWorkGroupInvocations = 16 * devinfo->max_cs_threads,
+ .maxComputeWorkGroupSize = {
+ 16 * devinfo->max_cs_threads,
+ 16 * devinfo->max_cs_threads,
+ 16 * devinfo->max_cs_threads,
+ },
+ .subPixelPrecisionBits = 4 /* FIXME */,
+ .subTexelPrecisionBits = 4 /* FIXME */,
+ .mipmapPrecisionBits = 4 /* FIXME */,
+ .maxDrawIndexedIndexValue = UINT32_MAX,
+ .maxDrawIndirectInstanceCount = UINT32_MAX,
+ .primitiveRestartForPatches = UINT32_MAX,
+ .maxSamplerLodBias = 16,
+ .maxSamplerAnisotropy = 16,
+ .maxViewports = 32,
+ .maxDynamicViewportStates = UINT32_MAX,
+ .maxViewportDimensions = { (1 << 14), (1 << 14) },
+ .viewportBoundsRange = { -1.0, 1.0 }, /* FIXME */
+ .viewportSubPixelBits = 13, /* We take a float? */
+ .minMemoryMapAlignment = 64, /* A cache line */
+ .minTexelBufferOffsetAlignment = 1,
+ .minUniformBufferOffsetAlignment = 1,
+ .minStorageBufferOffsetAlignment = 1,
+ .minTexelOffset = 0, /* FIXME */
+ .maxTexelOffset = 0, /* FIXME */
+ .minTexelGatherOffset = 0, /* FIXME */
+ .maxTexelGatherOffset = 0, /* FIXME */
+ .minInterpolationOffset = 0, /* FIXME */
+ .maxInterpolationOffset = 0, /* FIXME */
+ .subPixelInterpolationOffsetBits = 0, /* FIXME */
+ .maxFramebufferWidth = (1 << 14),
+ .maxFramebufferHeight = (1 << 14),
+ .maxFramebufferLayers = (1 << 10),
+ .maxFramebufferColorSamples = 8,
+ .maxFramebufferDepthSamples = 8,
+ .maxFramebufferStencilSamples = 8,
+ .maxColorAttachments = MAX_RTS,
+ .maxSampledImageColorSamples = 8,
+ .maxSampledImageDepthSamples = 8,
+ .maxSampledImageIntegerSamples = 1,
+ .maxStorageImageSamples = 1,
+ .maxSampleMaskWords = 1,
+ .timestampFrequency = 0 /* FIXME */,
+ .maxClipDistances = 0 /* FIXME */,
+ .maxCullDistances = 0 /* FIXME */,
+ .maxCombinedClipAndCullDistances = 0 /* FIXME */,
+ .pointSizeRange = { 0.125, 255.875 },
+ .lineWidthRange = { 0.0, 7.9921875 },
+ .pointSizeGranularity = (1.0 / 8.0),
+ .lineWidthGranularity = (1.0 / 128.0),
+ };
+
+ return VK_SUCCESS;
+}
+
VkResult anv_GetPhysicalDeviceInfo(
VkPhysicalDevice physicalDevice,
VkPhysicalDeviceInfoType infoType,