#ifdef DZN_USE_WSI_PLATFORM
.KHR_swapchain = true,
#endif
+ .EXT_descriptor_indexing = pdev->shader_model >= D3D_SHADER_MODEL_6_6,
.EXT_shader_subgroup_ballot = true,
.EXT_shader_subgroup_vote = true,
.EXT_subgroup_size_control = true,
.shaderDrawParameters = true,
};
+ bool support_descriptor_indexing = pdev->shader_model >= D3D_SHADER_MODEL_6_6;
const VkPhysicalDeviceVulkan12Features core_1_2 = {
.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES,
.samplerMirrorClampToEdge = false,
.shaderFloat16 = pdev->options4.Native16BitShaderOpsSupported,
.shaderInt8 = false,
- .descriptorIndexing = false,
+ .descriptorIndexing = support_descriptor_indexing,
.shaderInputAttachmentArrayDynamicIndexing = true,
.shaderUniformTexelBufferArrayDynamicIndexing = true,
.shaderStorageTexelBufferArrayDynamicIndexing = true,
- .shaderUniformBufferArrayNonUniformIndexing = false,
- .shaderSampledImageArrayNonUniformIndexing = false,
- .shaderStorageBufferArrayNonUniformIndexing = false,
- .shaderStorageImageArrayNonUniformIndexing = false,
- .shaderInputAttachmentArrayNonUniformIndexing = false,
- .shaderUniformTexelBufferArrayNonUniformIndexing = false,
- .shaderStorageTexelBufferArrayNonUniformIndexing = false,
- .descriptorBindingUniformBufferUpdateAfterBind = false,
- .descriptorBindingSampledImageUpdateAfterBind = false,
- .descriptorBindingStorageImageUpdateAfterBind = false,
- .descriptorBindingStorageBufferUpdateAfterBind = false,
- .descriptorBindingUniformTexelBufferUpdateAfterBind = false,
- .descriptorBindingStorageTexelBufferUpdateAfterBind = false,
- .descriptorBindingUpdateUnusedWhilePending = false,
- .descriptorBindingPartiallyBound = false,
+ .shaderUniformBufferArrayNonUniformIndexing = support_descriptor_indexing,
+ .shaderSampledImageArrayNonUniformIndexing = support_descriptor_indexing,
+ .shaderStorageBufferArrayNonUniformIndexing = support_descriptor_indexing,
+ .shaderStorageImageArrayNonUniformIndexing = support_descriptor_indexing,
+ .shaderInputAttachmentArrayNonUniformIndexing = support_descriptor_indexing,
+ .shaderUniformTexelBufferArrayNonUniformIndexing = support_descriptor_indexing,
+ .shaderStorageTexelBufferArrayNonUniformIndexing = support_descriptor_indexing,
+ .descriptorBindingUniformBufferUpdateAfterBind = support_descriptor_indexing,
+ .descriptorBindingSampledImageUpdateAfterBind = support_descriptor_indexing,
+ .descriptorBindingStorageImageUpdateAfterBind = support_descriptor_indexing,
+ .descriptorBindingStorageBufferUpdateAfterBind = support_descriptor_indexing,
+ .descriptorBindingUniformTexelBufferUpdateAfterBind = support_descriptor_indexing,
+ .descriptorBindingStorageTexelBufferUpdateAfterBind = support_descriptor_indexing,
+ .descriptorBindingUpdateUnusedWhilePending = support_descriptor_indexing,
+ .descriptorBindingPartiallyBound = support_descriptor_indexing,
.descriptorBindingVariableDescriptorCount = false,
.runtimeDescriptorArray = false,
.shaderInputAttachmentArrayNonUniformIndexingNative = true,
.robustBufferAccessUpdateAfterBind = true,
.quadDivergentImplicitLod = false,
- .maxPerStageDescriptorUpdateAfterBindSamplers = 0,
- .maxPerStageDescriptorUpdateAfterBindUniformBuffers = 0,
- .maxPerStageDescriptorUpdateAfterBindStorageBuffers = 0,
- .maxPerStageDescriptorUpdateAfterBindSampledImages = 0,
- .maxPerStageDescriptorUpdateAfterBindStorageImages = 0,
- .maxPerStageDescriptorUpdateAfterBindInputAttachments = 0,
- .maxPerStageUpdateAfterBindResources = 0,
- .maxDescriptorSetUpdateAfterBindSamplers = 0,
- .maxDescriptorSetUpdateAfterBindUniformBuffers = 0,
- .maxDescriptorSetUpdateAfterBindUniformBuffersDynamic = 0,
- .maxDescriptorSetUpdateAfterBindStorageBuffers = 0,
- .maxDescriptorSetUpdateAfterBindStorageBuffersDynamic = 0,
- .maxDescriptorSetUpdateAfterBindSampledImages = 0,
- .maxDescriptorSetUpdateAfterBindStorageImages = 0,
- .maxDescriptorSetUpdateAfterBindInputAttachments = 0,
+ .maxUpdateAfterBindDescriptorsInAllPools = MAX_DESCS_PER_CBV_SRV_UAV_HEAP,
+ .maxPerStageDescriptorUpdateAfterBindSamplers = MAX_DESCS_PER_CBV_SRV_UAV_HEAP,
+ .maxPerStageDescriptorUpdateAfterBindUniformBuffers = MAX_DESCS_PER_CBV_SRV_UAV_HEAP,
+ .maxPerStageDescriptorUpdateAfterBindStorageBuffers = MAX_DESCS_PER_CBV_SRV_UAV_HEAP,
+ .maxPerStageDescriptorUpdateAfterBindSampledImages = MAX_DESCS_PER_CBV_SRV_UAV_HEAP,
+ .maxPerStageDescriptorUpdateAfterBindStorageImages = MAX_DESCS_PER_CBV_SRV_UAV_HEAP,
+ .maxPerStageDescriptorUpdateAfterBindInputAttachments = MAX_DESCS_PER_CBV_SRV_UAV_HEAP,
+ .maxPerStageUpdateAfterBindResources = MAX_DESCS_PER_CBV_SRV_UAV_HEAP,
+ .maxDescriptorSetUpdateAfterBindSamplers = MAX_DESCS_PER_CBV_SRV_UAV_HEAP,
+ .maxDescriptorSetUpdateAfterBindUniformBuffers = MAX_DESCS_PER_CBV_SRV_UAV_HEAP,
+ .maxDescriptorSetUpdateAfterBindUniformBuffersDynamic = MAX_DYNAMIC_UNIFORM_BUFFERS,
+ .maxDescriptorSetUpdateAfterBindStorageBuffers = MAX_DESCS_PER_CBV_SRV_UAV_HEAP,
+ .maxDescriptorSetUpdateAfterBindStorageBuffersDynamic = MAX_DYNAMIC_STORAGE_BUFFERS,
+ .maxDescriptorSetUpdateAfterBindSampledImages = MAX_DESCS_PER_CBV_SRV_UAV_HEAP,
+ .maxDescriptorSetUpdateAfterBindStorageImages = MAX_DESCS_PER_CBV_SRV_UAV_HEAP,
+ .maxDescriptorSetUpdateAfterBindInputAttachments = MAX_DESCS_PER_CBV_SRV_UAV_HEAP,
/* FIXME: add support for VK_RESOLVE_MODE_SAMPLE_ZERO_BIT,
* which is required by the VK 1.2 spec.
device->need_swapchain_blits = true;
}
- device->bindless = (instance->debug_flags & DZN_DEBUG_BINDLESS) != 0;
+ device->bindless = (instance->debug_flags & DZN_DEBUG_BINDLESS) != 0 ||
+ device->vk.enabled_features.descriptorIndexing ||
+ device->vk.enabled_extensions.EXT_descriptor_indexing;
if (device->bindless) {
dzn_foreach_pool_type(type) {