22#define VKD3D_MAX_UAV_CLEAR_DESCRIPTORS_PER_TYPE 256u
30#define vkd3d_find_struct(c, t) vkd3d_find_struct_(c, VKD3D_STRUCTURE_TYPE_##t)
60#define VK_EXTENSION(name, member) \
61 {VK_ ## name ## _EXTENSION_NAME, offsetof(struct vkd3d_vulkan_info, member)}
62#define VK_DEBUG_EXTENSION(name, member) \
63 {VK_ ## name ## _EXTENSION_NAME, offsetof(struct vkd3d_vulkan_info, member), true}
68 VK_EXTENSION(KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2, KHR_get_physical_device_properties2),
83#ifndef VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME
84#define VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME "VK_KHR_portability_subset"
90 VK_EXTENSION(KHR_DEDICATED_ALLOCATION, KHR_dedicated_allocation),
91 VK_EXTENSION(KHR_DRAW_INDIRECT_COUNT, KHR_draw_indirect_count),
92 VK_EXTENSION(KHR_GET_MEMORY_REQUIREMENTS_2, KHR_get_memory_requirements2),
93 VK_EXTENSION(KHR_IMAGE_FORMAT_LIST, KHR_image_format_list),
96 VK_EXTENSION(KHR_PORTABILITY_SUBSET, KHR_portability_subset),
98 VK_EXTENSION(KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE, KHR_sampler_mirror_clamp_to_edge),
99 VK_EXTENSION(KHR_TIMELINE_SEMAPHORE, KHR_timeline_semaphore),
102 VK_EXTENSION(EXT_CALIBRATED_TIMESTAMPS, EXT_calibrated_timestamps),
103 VK_EXTENSION(EXT_CONDITIONAL_RENDERING, EXT_conditional_rendering),
105 VK_EXTENSION(EXT_DEPTH_RANGE_UNRESTRICTED, EXT_depth_range_unrestricted),
106 VK_EXTENSION(EXT_DEPTH_CLIP_ENABLE, EXT_depth_clip_enable),
107 VK_EXTENSION(EXT_DESCRIPTOR_INDEXING, EXT_descriptor_indexing),
108 VK_EXTENSION(EXT_FRAGMENT_SHADER_INTERLOCK, EXT_fragment_shader_interlock),
109 VK_EXTENSION(EXT_MUTABLE_DESCRIPTOR_TYPE, EXT_mutable_descriptor_type),
111 VK_EXTENSION(EXT_SHADER_DEMOTE_TO_HELPER_INVOCATION, EXT_shader_demote_to_helper_invocation),
112 VK_EXTENSION(EXT_SHADER_STENCIL_EXPORT, EXT_shader_stencil_export),
113 VK_EXTENSION(EXT_SHADER_VIEWPORT_INDEX_LAYER, EXT_shader_viewport_index_layer),
114 VK_EXTENSION(EXT_TEXEL_BUFFER_ALIGNMENT, EXT_texel_buffer_alignment),
115 VK_EXTENSION(EXT_TRANSFORM_FEEDBACK, EXT_transform_feedback),
116 VK_EXTENSION(EXT_VERTEX_ATTRIBUTE_DIVISOR, EXT_vertex_attribute_divisor),
139 if (
device->vk_info.EXT_mutable_descriptor_type
155 set_desc.
pNext = &flags_info;
177 flags_info.
pNext = &mutable_info;
181 &
device->vk_descriptor_heap_layouts[
index].vk_set_layout))) < 0)
183 WARN(
"Failed to create Vulkan descriptor set layout, vr %d.\n", vr);
224 device->vk_descriptor_heap_layouts[
set] = vk_descriptor_heap_layouts[
set];
231 switch (
device->vk_descriptor_heap_layouts[
set].type)
248 ERR(
"Unhandled descriptor type %#x.\n",
device->vk_descriptor_heap_layouts[
set].type);
263 unsigned int count,
const char *extension_name)
269 if (!
strcmp(extensions[
i].extensionName, extension_name))
277 const char *disabled_extensions;
279 if (!(disabled_extensions =
getenv(
"VKD3D_DISABLE_EXTENSIONS")))
286 unsigned int count,
const char *extension_name)
292 if (!
strcmp(extensions[
i].extensionName, extension_name))
306 const char *
const *required_extensions,
unsigned int required_extension_count,
308 const char *
const *user_extensions,
unsigned int user_extension_count,
309 const char *
const *optional_user_extensions,
unsigned int optional_user_extension_count,
310 bool *user_extension_supported,
struct vkd3d_vulkan_info *vulkan_info,
const char *extension_type,
311 bool is_debug_enabled)
313 unsigned int extension_count = 0;
316 for (
i = 0;
i < required_extension_count; ++
i)
319 WARN(
"Required %s extension %s is not supported.\n",
320 extension_type,
debugstr_a(required_extensions[
i]));
324 for (
i = 0;
i < optional_extension_count; ++
i)
330 if (!is_debug_enabled && optional_extensions[
i].is_debug_only)
333 TRACE(
"Skipping debug-only extension %s.\n",
debugstr_a(extension_name));
344 for (
i = 0;
i < user_extension_count; ++
i)
347 WARN(
"Required user %s extension %s is not supported.\n",
352 VKD3D_ASSERT(!optional_user_extension_count || user_extension_supported);
353 for (
i = 0;
i < optional_user_extension_count; ++
i)
357 user_extension_supported[
i] =
true;
362 user_extension_supported[
i] =
false;
363 WARN(
"Optional user %s extension %s is not supported.\n",
364 extension_type,
debugstr_a(optional_user_extensions[
i]));
368 return extension_count;
372 unsigned int extension_count,
const char *extension_name)
377 for (
i = 0;
i < extension_count; ++
i)
379 if (!
strcmp(extensions[
i], extension_name))
380 return extension_count;
383 extensions[extension_count++] = extension_name;
384 return extension_count;
388 const char *
const *required_extensions,
unsigned int required_extension_count,
390 const char *
const *user_extensions,
unsigned int user_extension_count,
391 const char *
const *optional_user_extensions,
unsigned int optional_user_extension_count,
394 unsigned int extension_count = 0;
397 for (
i = 0;
i < required_extension_count; ++
i)
399 extensions[extension_count++] = required_extensions[
i];
401 for (
i = 0;
i < optional_extension_count; ++
i)
410 for (
i = 0;
i < user_extension_count; ++
i)
414 VKD3D_ASSERT(!optional_user_extension_count || user_extension_supported);
415 for (
i = 0;
i < optional_user_extension_count; ++
i)
417 if (!user_extension_supported[
i])
422 return extension_count;
427 uint32_t *instance_extension_count,
bool **user_extension_supported)
436 memset(vulkan_info, 0,
sizeof(*vulkan_info));
437 *instance_extension_count = 0;
441 ERR(
"Failed to enumerate instance extensions, vr %d.\n", vr);
448 TRACE(
"Enumerating %u instance extensions.\n",
count);
451 ERR(
"Failed to enumerate instance extensions, vr %d.\n", vr);
467 *user_extension_supported =
NULL;
475 *user_extension_supported, vulkan_info,
"instance",
497 ERR(
"Could not load function pointer for vkGetInstanceProcAddr().\n");
531 VkInstance vk_instance =
instance->vk_instance;
542 WARN(
"Failed to create debug report callback, vr %d.\n", vr);
570#define VKD3D_DEFAULT_HOST_TICKS_PER_SECOND 10000000
580 bool *user_extension_supported =
NULL;
585 const char **extensions;
587 VkInstance vk_instance;
595 WARN(
"Invalid signal event function pointer.\n");
600 WARN(
"Invalid create/join thread function pointers.\n");
623 &extension_count, &user_extension_supported)))
644 TRACE(
"Vulkan API version 1.1 is available; requesting it.\n");
671 if (!(extensions =
vkd3d_calloc(extension_count,
sizeof(*extensions))))
683 instance_info.
flags = 0;
692 user_extension_supported, &
instance->vk_info);
700 WARN(
"Failed to create Vulkan instance, vr %d.\n", vr);
709 if (
instance->vk_procs.vkDestroyInstance)
710 instance->vk_procs.vkDestroyInstance(vk_instance,
NULL);
721 instance->vk_instance = vk_instance;
723 TRACE(
"Created Vulkan instance %p.\n", vk_instance);
728 if (
instance->vk_info.EXT_debug_report)
740 TRACE(
"create_info %p, instance %p.\n", create_info,
instance);
746 WARN(
"Invalid structure type %#x.\n", create_info->
type);
759 TRACE(
"Created instance %p.\n",
object);
769 VkInstance vk_instance =
instance->vk_instance;
786 TRACE(
"%p increasing refcount to %u.\n",
instance, refcount);
795 TRACE(
"%p decreasing refcount to %u.\n",
instance, refcount);
893 VkPhysicalDevice physical_device =
device->vk_physical_device;
940 TRACE(
"Driver version: %#x (%u.%u.%u, %u.%u.%u.%u).\n", driver_version,
942 driver_version >> 22, (driver_version >> 14) & 0xff, (driver_version >> 6) & 0xff, driver_version & 0x3f);
943 TRACE(
"API version: %u.%u.%u.\n",
967 TRACE(
" Queue family [%u]: flags %s, count %u, timestamp bits %u, image transfer granularity %s.\n",
969 queue_properties[
i].queueCount, queue_properties[
i].timestampValidBits,
978 TRACE(
"Memory heap [%u]: size %#"PRIx64" (%"PRIu64" MiB), flags %s, memory types:\n",
983 if (
type->heapIndex !=
i)
999 TRACE(
"Device limits:\n");
1011 TRACE(
" bufferImageGranularity: %#"PRIx64".\n", limits->bufferImageGranularity);
1012 TRACE(
" sparseAddressSpaceSize: %#"PRIx64".\n", limits->sparseAddressSpaceSize);
1036 TRACE(
" maxTessellationControlPerVertexInputComponents: %u.\n",
1038 TRACE(
" maxTessellationControlPerVertexOutputComponents: %u.\n",
1040 TRACE(
" maxTessellationControlPerPatchOutputComponents: %u.\n",
1042 TRACE(
" maxTessellationControlTotalOutputComponents: %u.\n",
1044 TRACE(
" maxTessellationEvaluationInputComponents: %u.\n",
1046 TRACE(
" maxTessellationEvaluationOutputComponents: %u.\n",
1076 TRACE(
" minTexelBufferOffsetAlignment: %#"PRIx64".\n", limits->minTexelBufferOffsetAlignment);
1077 TRACE(
" minUniformBufferOffsetAlignment: %#"PRIx64".\n", limits->minUniformBufferOffsetAlignment);
1078 TRACE(
" minStorageBufferOffsetAlignment: %#"PRIx64".\n", limits->minStorageBufferOffsetAlignment);
1112 TRACE(
" optimalBufferCopyOffsetAlignment: %#"PRIx64".\n", limits->optimalBufferCopyOffsetAlignment);
1113 TRACE(
" optimalBufferCopyRowPitchAlignment: %#"PRIx64".\n", limits->optimalBufferCopyRowPitchAlignment);
1114 TRACE(
" nonCoherentAtomSize: %#"PRIx64".\n", limits->nonCoherentAtomSize);
1116 descriptor_indexing = &
info->descriptor_indexing_properties;
1117 TRACE(
" VkPhysicalDeviceDescriptorIndexingPropertiesEXT:\n");
1119 TRACE(
" maxUpdateAfterBindDescriptorsInAllPools: %u.\n",
1122 TRACE(
" shaderUniformBufferArrayNonUniformIndexingNative: %#x.\n",
1124 TRACE(
" shaderSampledImageArrayNonUniformIndexingNative: %#x.\n",
1126 TRACE(
" shaderStorageBufferArrayNonUniformIndexingNative: %#x.\n",
1128 TRACE(
" shaderStorageImageArrayNonUniformIndexingNative: %#x.\n",
1130 TRACE(
" shaderInputAttachmentArrayNonUniformIndexingNative: %#x.\n",
1133 TRACE(
" robustBufferAccessUpdateAfterBind: %#x.\n",
1135 TRACE(
" quadDivergentImplicitLod: %#x.\n",
1138 TRACE(
" maxPerStageDescriptorUpdateAfterBindSamplers: %u.\n",
1140 TRACE(
" maxPerStageDescriptorUpdateAfterBindUniformBuffers: %u.\n",
1142 TRACE(
" maxPerStageDescriptorUpdateAfterBindStorageBuffers: %u.\n",
1144 TRACE(
" maxPerStageDescriptorUpdateAfterBindSampledImages: %u.\n",
1146 TRACE(
" maxPerStageDescriptorUpdateAfterBindStorageImages: %u.\n",
1148 TRACE(
" maxPerStageDescriptorUpdateAfterBindInputAttachments: %u.\n",
1150 TRACE(
" maxPerStageUpdateAfterBindResources: %u.\n",
1153 TRACE(
" maxDescriptorSetUpdateAfterBindSamplers: %u.\n",
1155 TRACE(
" maxDescriptorSetUpdateAfterBindUniformBuffers: %u.\n",
1157 TRACE(
" maxDescriptorSetUpdateAfterBindUniformBuffersDynamic: %u.\n",
1159 TRACE(
" maxDescriptorSetUpdateAfterBindStorageBuffers: %u.\n",
1161 TRACE(
" maxDescriptorSetUpdateAfterBindStorageBuffersDynamic: %u.\n",
1163 TRACE(
" maxDescriptorSetUpdateAfterBindSampledImages: %u.\n",
1165 TRACE(
" maxDescriptorSetUpdateAfterBindStorageImages: %u.\n",
1167 TRACE(
" maxDescriptorSetUpdateAfterBindInputAttachments: %u.\n",
1170 maintenance3 = &
info->maintenance3_properties;
1171 TRACE(
" VkPhysicalDeviceMaintenance3Properties:\n");
1173 TRACE(
" maxMemoryAllocationSize: %#"PRIx64".\n", maintenance3->maxMemoryAllocationSize);
1175 buffer_alignment = &
info->texel_buffer_alignment_properties;
1176 TRACE(
" VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT:\n");
1177 TRACE(
" storageTexelBufferOffsetAlignmentBytes: %#"PRIx64".\n",
1178 buffer_alignment->storageTexelBufferOffsetAlignmentBytes);
1179 TRACE(
" storageTexelBufferOffsetSingleTexelAlignment: %#x.\n",
1181 TRACE(
" uniformTexelBufferOffsetAlignmentBytes: %#"PRIx64".\n",
1182 buffer_alignment->uniformTexelBufferOffsetAlignmentBytes);
1183 TRACE(
" uniformTexelBufferOffsetSingleTexelAlignment: %#x.\n",
1186 xfb = &
info->xfb_properties;
1187 TRACE(
" VkPhysicalDeviceTransformFeedbackPropertiesEXT:\n");
1190 TRACE(
" maxTransformFeedbackBufferSize: %#"PRIx64".\n", xfb->maxTransformFeedbackBufferSize);
1199 divisor_properties = &
info->vertex_divisor_properties;
1200 TRACE(
" VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT:\n");
1216 TRACE(
"Device features:\n");
1273 descriptor_indexing = &
info->descriptor_indexing_features;
1274 TRACE(
" VkPhysicalDeviceDescriptorIndexingFeaturesEXT:\n");
1276 TRACE(
" shaderInputAttachmentArrayDynamicIndexing: %#x.\n",
1278 TRACE(
" shaderUniformTexelBufferArrayDynamicIndexing: %#x.\n",
1280 TRACE(
" shaderStorageTexelBufferArrayDynamicIndexing: %#x.\n",
1283 TRACE(
" shaderUniformBufferArrayNonUniformIndexing: %#x.\n",
1285 TRACE(
" shaderSampledImageArrayNonUniformIndexing: %#x.\n",
1287 TRACE(
" shaderStorageBufferArrayNonUniformIndexing: %#x.\n",
1289 TRACE(
" shaderStorageImageArrayNonUniformIndexing: %#x.\n",
1291 TRACE(
" shaderInputAttachmentArrayNonUniformIndexing: %#x.\n",
1293 TRACE(
" shaderUniformTexelBufferArrayNonUniformIndexing: %#x.\n",
1295 TRACE(
" shaderStorageTexelBufferArrayNonUniformIndexing: %#x.\n",
1298 TRACE(
" descriptorBindingUniformBufferUpdateAfterBind: %#x.\n",
1300 TRACE(
" descriptorBindingSampledImageUpdateAfterBind: %#x.\n",
1302 TRACE(
" descriptorBindingStorageImageUpdateAfterBind: %#x.\n",
1304 TRACE(
" descriptorBindingStorageBufferUpdateAfterBind: %#x.\n",
1306 TRACE(
" descriptorBindingUniformTexelBufferUpdateAfterBind: %#x.\n",
1308 TRACE(
" descriptorBindingStorageTexelBufferUpdateAfterBind: %#x.\n",
1311 TRACE(
" descriptorBindingUpdateUnusedWhilePending: %#x.\n",
1313 TRACE(
" descriptorBindingPartiallyBound: %#x.\n",
1315 TRACE(
" descriptorBindingVariableDescriptorCount: %#x.\n",
1317 TRACE(
" runtimeDescriptorArray: %#x.\n",
1320 conditional_rendering_features = &
info->conditional_rendering_features;
1321 TRACE(
" VkPhysicalDeviceConditionalRenderingFeaturesEXT:\n");
1324 depth_clip_features = &
info->depth_clip_features;
1325 TRACE(
" VkPhysicalDeviceDepthClipEnableFeaturesEXT:\n");
1328 fragment_shader_interlock_features = &
info->fragment_shader_interlock_features;
1329 TRACE(
" VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT:\n");
1330 TRACE(
" fragmentShaderSampleInterlock: %#x.\n",
1332 TRACE(
" fragmentShaderPixelInterlock: %#x.\n",
1334 TRACE(
" fragmentShaderShadingRateInterlock: %#x.\n",
1337 demote_features = &
info->demote_features;
1338 TRACE(
" VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT:\n");
1341 buffer_alignment_features = &
info->texel_buffer_alignment_features;
1342 TRACE(
" VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT:\n");
1345 xfb = &
info->xfb_features;
1346 TRACE(
" VkPhysicalDeviceTransformFeedbackFeaturesEXT:\n");
1350 divisor_features = &
info->vertex_divisor_features;
1351 TRACE(
" VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT:\n");
1352 TRACE(
" vertexAttributeInstanceRateDivisor: %#x.\n",
1354 TRACE(
" vertexAttributeInstanceRateZeroDivisor: %#x.\n",
1362 bool have_11_0 =
true;
1364#define CHECK_MIN_REQUIREMENT(name, value) \
1365 if (vk_info->device_limits.name < value) \
1366 WARN(#name " does not meet feature level 11_0 requirements.\n");
1367#define CHECK_MAX_REQUIREMENT(name, value) \
1368 if (vk_info->device_limits.name > value) \
1369 WARN(#name " does not meet feature level 11_0 requirements.\n");
1370#define CHECK_FEATURE(name) \
1371 if (!features->name) \
1373 WARN(#name " is not supported.\n"); \
1374 have_11_0 = false; \
1378 WARN(
"Timestamps are not supported on all graphics and compute queues.\n");
1412 WARN(
"Depth clip enable is not supported.\n");
1414 WARN(
"Stream output is not supported.\n");
1417 WARN(
"Vertex attribute instance rate divisor is not supported.\n");
1419 WARN(
"Vertex attribute instance rate zero divisor is not supported.\n");
1421#undef CHECK_MIN_REQUIREMENT
1422#undef CHECK_MAX_REQUIREMENT
1463 unsigned int srv_divisor = 1, uav_divisor = 1;
1530 uint32_t *vk_extension_count,
uint32_t *device_extension_count,
bool **user_extension_supported)
1534 VkPhysicalDevice physical_device =
device->vk_physical_device;
1538 *device_extension_count = 0;
1542 ERR(
"Failed to enumerate device extensions, vr %d.\n", vr);
1546 if (!(*vk_extensions =
vkd3d_calloc(*vk_extension_count,
sizeof(**vk_extensions))))
1549 TRACE(
"Enumerating %u device extensions.\n", *vk_extension_count);
1552 ERR(
"Failed to enumerate device extensions, vr %d.\n", vr);
1568 *user_extension_supported =
NULL;
1577 *user_extension_supported, vulkan_info,
"device",
1585 const char *caps_override, *
p;
1587 static const struct override_value
1592 feature_level_override_values[] =
1600 resource_binding_tier_override_values[] =
1606 static const struct override_field
1610 const struct override_value *
values;
1618 feature_level_override_values,
1622 "resource_binding_tier",
1624 resource_binding_tier_override_values,
1625 ARRAY_SIZE(resource_binding_tier_override_values)
1629 if (!(caps_override =
getenv(
"VKD3D_CAPS_OVERRIDE")))
1639 const struct override_field *
field = &override_fields[
i];
1648 for (
j = 0;
j <
field->value_count; ++
j)
1650 const struct override_value *
value = &
field->values[
j];
1654 && (
p[value_len] ==
'\0' ||
p[value_len] ==
','))
1661 TRACE(
"Overriding caps with: %s\n", caps_override);
1670 if (
j ==
field->value_count)
1672 WARN(
"Cannot parse the override caps string: %s\n", caps_override);
1682 WARN(
"Cannot parse the override caps string: %s\n", caps_override);
1691 uint32_t *device_extension_count,
bool **user_extension_supported)
1697 VkPhysicalDevice physical_device =
device->vk_physical_device;
1715 device_extension_count, user_extension_supported)))
1730 physical_device_info->
properties2.properties.sparseProperties.residencyNonResidentStrict =
VK_FALSE;
1745 device->feature_options.OutputMergerLogicOp = features->
logicOp;
1751 else if (!
device->vk_info.sparse_properties.residencyNonResidentStrict)
1759 if (
device->feature_options.TiledResourcesTier)
1761 WARN(
"Tiled resources are not implemented yet.\n");
1765 if (
device->vk_info.device_limits.maxPerStageDescriptorSamplers <= 16)
1767 else if (
device->vk_info.device_limits.maxPerStageDescriptorUniformBuffers <= 14)
1776 device->feature_options.MaxGPUVirtualAddressBitsPerResource = 40;
1777 device->feature_options.StandardSwizzle64KBSupported =
FALSE;
1779 device->feature_options.CrossAdapterRowMajorTextureSupported =
FALSE;
1784 && (subgroup_properties->
supportedOperations & required_subgroup_features) == required_subgroup_features
1785 && (subgroup_properties->
supportedStages & required_stages) == required_stages;
1789 device->feature_options1.ExpandedComputeResourceStates =
TRUE;
1796 device->feature_options3.CopyQueueTimestampQueriesSupported =
FALSE;
1797 device->feature_options3.CastingFullyTypedFormatSupported =
FALSE;
1800 device->feature_options3.BarycentricsSupported =
FALSE;
1802 device->feature_options4.MSAA64KBAlignedTextureSupported =
FALSE;
1806 device->feature_options4.Native16BitShaderOpsSupported =
FALSE;
1808 device->feature_options5.SRVOnlyTiledResourceTier3 =
FALSE;
1853 device->feature_options.VPAndRTArrayIndexFromAnyShaderFeedingRasterizerSupportedWithoutGSEmulation =
1864 *user_extension_supported =
NULL;
1910 WARN(
"Disabling robust buffer access for the update after bind feature.\n");
1936 if (
device->vk_info.EXT_mutable_descriptor_type)
1943 if (descriptor_set_count >
device->vk_info.device_limits.maxBoundDescriptorSets)
1945 WARN(
"Disabling VK_KHR_push_descriptor to save a descriptor set.\n");
1950 if (
device->use_vk_heaps)
1955 &physical_device_info->
properties2.properties.limits);
1957 TRACE(
"Device %p: using %s descriptor heaps, with%s descriptor indexing, "
1958 "with%s push descriptors, with%s mutable descriptors\n",
1960 device->vk_info.EXT_descriptor_indexing ?
"" :
"out",
1961 device->vk_info.KHR_push_descriptor ?
"" :
"out",
1962 device->vk_info.EXT_mutable_descriptor_type ?
"" :
"out");
1970 unsigned int device_index, VkPhysicalDevice *selected_device)
1974 VkInstance vk_instance =
instance->vk_instance;
1977 VkPhysicalDevice *physical_devices;
1985 ERR(
"Failed to enumerate physical devices, vr %d.\n", vr);
1990 ERR(
"No physical device available.\n");
1996 TRACE(
"Enumerating %u physical device(s).\n",
count);
1999 ERR(
"Failed to enumerate physical devices, vr %d.\n", vr);
2004 if (device_index != ~0
u && device_index >=
count)
2005 WARN(
"Device index %u is out of range.\n", device_index);
2012 if (
i == device_index)
2016 dgpu_device = physical_devices[
i];
2018 igpu_device = physical_devices[
i];
2022 device = dgpu_device ? dgpu_device : igpu_device;
2024 device = physical_devices[0];
2032 *selected_device =
device;
2058 if (
device->direct_queue)
2083 device->queue_family_count = 0;
2088 device->queue_family_indices[
device->queue_family_count++] = direct_family_index;
2090 goto out_destroy_queues;
2092 if (compute_family_index == direct_family_index)
2096 device->queue_family_indices[
device->queue_family_count++] = compute_family_index;
2098 goto out_destroy_queues;
2100 if (transfer_family_index == direct_family_index)
2102 else if (transfer_family_index == compute_family_index)
2106 device->queue_family_indices[
device->queue_family_count++] = transfer_family_index;
2108 goto out_destroy_queues;
2110 device->feature_options3.CopyQueueTimestampQueriesSupported = !!
device->copy_queue->timestamp_bits;
2132 info->family_index[
i] = ~0
u;
2161 info->family_index[vkd3d_family] =
i;
2162 info->vk_properties[vkd3d_family] = queue_properties[
i];
2163 queue_info = &
info->vk_queue_create_info[vkd3d_family];
2167 queue_info->
flags = 0;
2177 FIXME(
"Could not find a suitable queue family for a direct command queue.\n");
2194 info->vk_family_count = 1;
2197 if (
info->vk_queue_create_info[
i].queueCount)
2198 info->vk_queue_create_info[
info->vk_family_count++] =
info->vk_queue_create_info[
i];
2212 memset(&resource_desc, 0,
sizeof(resource_desc));
2214 resource_desc.Width = 1024;
2215 resource_desc.Height = 1025;
2216 resource_desc.DepthOrArraySize = 1;
2217 resource_desc.MipLevels = 1;
2219 resource_desc.SampleDesc.Count = 4;
2226 &&
info.alignment <= 0x10000;
2236 bool *user_extension_supported =
NULL;
2237 VkPhysicalDevice physical_device;
2239 unsigned int device_index;
2241 const char **extensions;
2246 TRACE(
"device %p, create_info %p.\n",
device, create_info);
2250 if ((!physical_device || device_index != ~0
u)
2254 device->vk_physical_device = physical_device;
2259 TRACE(
"Using queue family %u for direct command queues.\n",
2261 TRACE(
"Using queue family %u for compute command queues.\n",
2263 TRACE(
"Using queue family %u for copy command queues.\n",
2269 &extension_count, &user_extension_supported)))
2272 if (!(extensions =
vkd3d_calloc(extension_count,
sizeof(*extensions))))
2294 user_extension_supported, &
device->vk_info);
2303 WARN(
"Failed to create Vulkan device, vr %d.\n", vr);
2310 if (
device->vk_procs.vkDestroyDevice)
2311 device->vk_procs.vkDestroyDevice(vk_device,
NULL);
2315 device->vk_device = vk_device;
2320 device->vk_procs.vkDestroyDevice(vk_device,
NULL);
2326 TRACE(
"Created Vulkan device %p.\n", vk_device);
2341 cache_info.
flags = 0;
2345 &
device->vk_pipeline_cache))) < 0)
2347 ERR(
"Failed to create Vulkan pipeline cache, vr %d.\n", vr);
2358 if (
device->vk_pipeline_cache)
2364#define VKD3D_VA_FALLBACK_BASE 0x8000000000000000ull
2365#define VKD3D_VA_SLAB_BASE 0x0000001000000000ull
2366#define VKD3D_VA_SLAB_SIZE_SHIFT 32
2367#define VKD3D_VA_SLAB_SIZE (1ull << VKD3D_VA_SLAB_SIZE_SHIFT)
2368#define VKD3D_VA_SLAB_COUNT (64 * 1024)
2379 slab->
size = aligned_size;
2401 if (aligned_size > ceiling || ceiling - aligned_size <
base)
2410 allocation = &
allocator->fallback_allocations[
allocator->fallback_allocation_count++];
2412 allocation->
size = aligned_size;
2435 if (size <= VKD3D_VA_SLAB_SIZE && allocator->free_slab)
2450 unsigned int slab_idx;
2463 if (base_offset >= slab->
size)
2477 if (*address < allocation->
base)
2492 return allocation ? allocation->
ptr :
NULL;
2524 unsigned int slab_idx;
2562 (
allocator->fallback_allocation_count -
index) *
sizeof(*allocation));
2644 device->vk_host_time_domain = -1;
2646 if (!
device->vk_info.EXT_calibrated_timestamps)
2653 WARN(
"Failed to get calibrated time domains, vr %d.\n", vr);
2658 FIXME(
"Calibrated time domain list is incomplete.\n");
2662 WARN(
"Device time domain not found. Calibrated timestamps will not be available.\n");
2670 device->vk_host_time_domain = host_time_domains[
i];
2673 if (
device->vk_host_time_domain == -1)
2674 WARN(
"Found no acceptable host time domain. Calibrated timestamps will not be available.\n");
2682 if (
device->use_vk_heaps)
2691 device->vk_pool_count = 3;
2712 device->vk_pool_count = 6;
2723 union d3d12_desc_object
u;
2729 for (
u.object =
cache->heads[
i].head;
u.object;
u.object =
next)
2731 next =
u.header->next;
2760 REFIID iid,
void **
object)
2766 WARN(
"Output pointer is NULL, returning E_POINTER.\n");
2770 if (
IsEqualGUID(iid, &IID_ID3D12ShaderCacheSession)
2775 ID3D12ShaderCacheSession_AddRef(iface);
2883 TRACE(
"iface %p, key %p, key_size %#x, value %p, value_size %p.\n",
2884 iface,
key, key_size,
value, value_size);
2888 WARN(
"value_size is NULL, returning E_INVALIDARG.\n");
2905 TRACE(
"iface %p, key %p, key_size %#x, value %p, value_size %u.\n",
2906 iface,
key, key_size,
value, value_size);
2908 if (!
key || !key_size || !
value || !value_size)
2910 WARN(
"Invalid input parameters, returning E_INVALIDARG.\n");
2920 FIXME(
"iface %p stub!\n", iface);
2928 TRACE(
"iface %p.\n", iface);
2965 if (!
session->desc.MaximumValueFileSizeBytes)
2966 session->desc.MaximumValueFileSizeBytes = 128 * 1024 * 1024;
2967 if (!
session->desc.MaximumInMemoryCacheSizeBytes)
2968 session->desc.MaximumInMemoryCacheSizeBytes = 1024 * 1024;
2969 if (!
session->desc.MaximumInMemoryCacheEntries)
2970 session->desc.MaximumInMemoryCacheEntries = 128;
2980 if (!
memcmp(&
i->desc.Identifier, &
desc->Identifier,
sizeof(
desc->Identifier)))
2982 TRACE(
"Found an existing cache %p from session %p.\n",
i->cache,
i);
2983 if (
desc->Version ==
i->desc.Version)
2992 i->desc.Version,
desc->Version);
3002 FIXME(
"Disk caches are not yet implemented.\n");
3007 WARN(
"Failed to open shader cache.\n");
3051 ID3D12Device9_AddRef(iface);
3080 device->worker_should_exit =
true;
3119 if (
device->use_vk_heaps)
3124 IUnknown_Release(
device->parent);
3138 TRACE(
"iface %p, guid %s, data_size %p, data %p.\n",
3149 TRACE(
"iface %p, guid %s, data_size %u, data %p.\n",
3177 TRACE(
"iface %p.\n", iface);
3189 TRACE(
"iface %p, desc %p, riid %s, command_queue %p.\n",
3196 riid, command_queue);
3206 TRACE(
"iface %p, type %#x, riid %s, command_allocator %p.\n",
3213 riid, command_allocator);
3223 TRACE(
"iface %p, desc %p, riid %s, pipeline_state %p.\n",
3230 &IID_ID3D12PipelineState,
riid, pipeline_state);
3240 TRACE(
"iface %p, desc %p, riid %s, pipeline_state %p.\n",
3247 &IID_ID3D12PipelineState,
riid, pipeline_state);
3258 TRACE(
"iface %p, node_mask 0x%08x, type %#x, command_allocator %p, "
3259 "initial_pipeline_state %p, riid %s, command_list %p.\n",
3260 iface, node_mask,
type, command_allocator,
3264 initial_pipeline_state, &
object)))
3268 &IID_ID3D12GraphicsCommandList6,
riid, command_list);
3283 for (
i = 0;
i <
ARRAY_SIZE(blacklisted_format_features); ++
i)
3285 if (blacklisted_format_features[
i].
Format == format_support->
Format)
3287 format_support->
Support1 &= ~blacklisted_format_features[
i].Support1;
3288 format_support->
Support2 &= ~blacklisted_format_features[
i].Support2;
3304 TRACE(
"Format %#x, sample count %u, flags %#x.\n",
data->Format,
data->SampleCount,
data->Flags);
3306 data->NumQualityLevels = 0;
3309 WARN(
"Invalid sample count %u.\n",
data->SampleCount);
3310 if (!
data->SampleCount)
3313 if (
data->SampleCount == 1)
3315 data->NumQualityLevels = 1;
3326 FIXME(
"Unhandled format %#x.\n",
data->Format);
3330 FIXME(
"Ignoring flags %#x.\n",
data->Flags);
3341 WARN(
"Format %#x is not supported.\n",
format->dxgi_format);
3346 ERR(
"Failed to get image format properties, vr %d.\n", vr);
3351 data->NumQualityLevels = 1;
3354 TRACE(
"Returning %u quality levels.\n",
data->NumQualityLevels);
3365 for (
i = 0;
i <
device->memory_properties.memoryTypeCount; ++
i)
3369 if (coherent && !(
device->memory_properties.memoryTypes[
i].propertyFlags
3382 TRACE(
"iface %p, feature %#x, feature_data %p, feature_data_size %u.\n",
3383 iface,
feature, feature_data, feature_data_size);
3391 if (feature_data_size !=
sizeof(*
data))
3393 WARN(
"Invalid size %u.\n", feature_data_size);
3399 TRACE(
"Double precision shader ops %#x.\n",
data->DoublePrecisionFloatShaderOps);
3400 TRACE(
"Output merger logic op %#x.\n",
data->OutputMergerLogicOp);
3401 TRACE(
"Shader min precision support %#x.\n",
data->MinPrecisionSupport);
3402 TRACE(
"Tiled resources tier %#x.\n",
data->TiledResourcesTier);
3403 TRACE(
"Resource binding tier %#x.\n",
data->ResourceBindingTier);
3404 TRACE(
"PS specified stencil ref %#x.\n",
data->PSSpecifiedStencilRefSupported);
3405 TRACE(
"Typed UAV load and additional formats %#x.\n",
data->TypedUAVLoadAdditionalFormats);
3406 TRACE(
"ROV %#x.\n",
data->ROVsSupported);
3407 TRACE(
"Conservative rasterization tier %#x.\n",
data->ConservativeRasterizationTier);
3408 TRACE(
"Max GPU virtual address bits per resource %u.\n",
data->MaxGPUVirtualAddressBitsPerResource);
3409 TRACE(
"Standard swizzle 64KB %#x.\n",
data->StandardSwizzle64KBSupported);
3410 TRACE(
"Cross-node sharing tier %#x.\n",
data->CrossNodeSharingTier);
3411 TRACE(
"Cross-adapter row-major texture %#x.\n",
data->CrossAdapterRowMajorTextureSupported);
3412 TRACE(
"VP and RT array index from any shader without GS emulation %#x.\n",
3413 data->VPAndRTArrayIndexFromAnyShaderFeedingRasterizerSupportedWithoutGSEmulation);
3414 TRACE(
"Resource heap tier %#x.\n",
data->ResourceHeapTier);
3423 if (feature_data_size !=
sizeof(*
data))
3425 WARN(
"Invalid size %u.\n", feature_data_size);
3429 if (
data->NodeIndex)
3431 FIXME(
"Multi-adapter not supported.\n");
3435 WARN(
"Assuming device does not support tile based rendering.\n");
3439 data->CacheCoherentUMA =
data->UMA && coherent;
3441 TRACE(
"Tile based renderer %#x, UMA %#x, cache coherent UMA %#x.\n",
3442 data->TileBasedRenderer,
data->UMA,
data->CacheCoherentUMA);
3452 if (feature_data_size !=
sizeof(*
data))
3454 WARN(
"Invalid size %u.\n", feature_data_size);
3457 if (!
data->NumFeatureLevels)
3460 data->MaxSupportedFeatureLevel = 0;
3461 for (
i = 0;
i <
data->NumFeatureLevels; ++
i)
3465 data->MaxSupportedFeatureLevel =
fl;
3468 TRACE(
"Max supported feature level %#x.\n",
data->MaxSupportedFeatureLevel);
3480 if (feature_data_size !=
sizeof(*
data))
3482 WARN(
"Invalid size %u.\n", feature_data_size);
3492 FIXME(
"Unhandled format %#x.\n",
data->Format);
3532 if (
device->vk_info.uav_read_without_format)
3549 TRACE(
"Format %#x, support1 %#x, support2 %#x.\n",
data->Format,
data->Support1,
data->Support2);
3557 if (feature_data_size !=
sizeof(*
data))
3559 WARN(
"Invalid size %u.\n", feature_data_size);
3571 if (feature_data_size !=
sizeof(*
data))
3573 WARN(
"Invalid size %u.\n", feature_data_size);
3579 data->PlaneCount = 1;
3587 FIXME(
"Unhandled format %#x.\n",
data->Format);
3602 if (feature_data_size !=
sizeof(*
data))
3604 WARN(
"Invalid size %u.\n", feature_data_size);
3608 data->MaxGPUVirtualAddressBitsPerResource =
options->MaxGPUVirtualAddressBitsPerResource;
3609 data->MaxGPUVirtualAddressBitsPerProcess =
options->MaxGPUVirtualAddressBitsPerResource;
3611 TRACE(
"Max GPU virtual address bits per resource %u, Max GPU virtual address bits per process %u.\n",
3612 data->MaxGPUVirtualAddressBitsPerResource,
data->MaxGPUVirtualAddressBitsPerProcess);
3620 if (feature_data_size !=
sizeof(*
data))
3622 WARN(
"Invalid size %u.\n", feature_data_size);
3630 WARN(
"Unknown shader model %#x.\n",
data->HighestShaderModel);
3634 TRACE(
"Request shader model %#x.\n",
data->HighestShaderModel);
3636#ifdef VKD3D_SHADER_UNSUPPORTED_DXIL
3642 TRACE(
"Shader model %#x.\n",
data->HighestShaderModel);
3650 if (feature_data_size !=
sizeof(*
data))
3652 WARN(
"Invalid size %u.\n", feature_data_size);
3658 TRACE(
"Wave ops %#x.\n",
data->WaveOps);
3659 TRACE(
"Min wave lane count %#x.\n",
data->WaveLaneCountMin);
3660 TRACE(
"Max wave lane count %#x.\n",
data->WaveLaneCountMax);
3661 TRACE(
"Total lane count %#x.\n",
data->TotalLaneCount);
3662 TRACE(
"Expanded compute resource states %#x.\n",
data->ExpandedComputeResourceStates);
3663 TRACE(
"Int64 shader ops %#x.\n",
data->Int64ShaderOps);
3671 if (feature_data_size !=
sizeof(*
data))
3673 WARN(
"Invalid size %u.\n", feature_data_size);
3677 TRACE(
"Root signature requested %#x.\n",
data->HighestVersion);
3682 TRACE(
"Root signature version %#x.\n",
data->HighestVersion);
3691 if (feature_data_size !=
sizeof(*
data))
3693 WARN(
"Invalid size %u.\n", feature_data_size);
3697 if (
data->NodeIndex)
3699 FIXME(
"Multi-adapter not supported.\n");
3703 WARN(
"Assuming device does not support tile based rendering.\n");
3707 data->CacheCoherentUMA =
data->UMA && coherent;
3709 WARN(
"Assuming device does not have an isolated memory management unit.\n");
3712 TRACE(
"Tile based renderer %#x, UMA %#x, cache coherent UMA %#x, isolated MMU %#x.\n",
3713 data->TileBasedRenderer,
data->UMA,
data->CacheCoherentUMA,
data->IsolatedMMU);
3721 if (feature_data_size !=
sizeof(*
data))
3723 WARN(
"Invalid size %u.\n", feature_data_size);
3729 TRACE(
"Depth bounds test %#x.\n",
data->DepthBoundsTestSupported);
3730 TRACE(
"Programmable sample positions tier %#x.\n",
data->ProgrammableSamplePositionsTier);
3738 if (feature_data_size !=
sizeof(*
data))
3740 WARN(
"Invalid size %u.\n", feature_data_size);
3750 TRACE(
"Shader cache support %#x.\n",
data->SupportFlags);
3758 if (feature_data_size !=
sizeof(*
data))
3760 WARN(
"Invalid size %u.\n", feature_data_size);
3764 switch (
data->CommandListType)
3769 data->PriorityForTypeIsSupported =
FALSE;
3770 TRACE(
"Command list type %#x, priority %u, supported %#x.\n",
3771 data->CommandListType,
data->Priority,
data->PriorityForTypeIsSupported);
3775 FIXME(
"Unhandled command list type %#x.\n",
data->CommandListType);
3784 if (feature_data_size !=
sizeof(*
data))
3786 WARN(
"Invalid size %u.\n", feature_data_size);
3792 TRACE(
"Copy queue timestamp queries %#x.\n",
data->CopyQueueTimestampQueriesSupported);
3793 TRACE(
"Casting fully typed format %#x.\n",
data->CastingFullyTypedFormatSupported);
3794 TRACE(
"Write buffer immediate %#x.\n",
data->WriteBufferImmediateSupportFlags);
3795 TRACE(
"View instancing tier %#x.\n",
data->ViewInstancingTier);
3796 TRACE(
"Barycentrics %#x.\n",
data->BarycentricsSupported);
3804 if (feature_data_size !=
sizeof(*
data))
3806 WARN(
"Invalid size %u.\n", feature_data_size);
3812 TRACE(
"Existing heaps %#x.\n",
data->Supported);
3820 if (feature_data_size !=
sizeof(*
data))
3822 WARN(
"Invalid size %u.\n", feature_data_size);
3828 TRACE(
"64 KiB aligned MSAA textures %#x.\n",
data->MSAA64KBAlignedTextureSupported);
3829 TRACE(
"Shared resource compatibility tier %#x.\n",
data->SharedResourceCompatibilityTier);
3830 TRACE(
"Native 16-bit shader ops %#x.\n",
data->Native16BitShaderOpsSupported);
3838 if (feature_data_size !=
sizeof(*
data))
3840 WARN(
"Invalid size %u.\n", feature_data_size);
3844 if (
data->NodeIndex)
3846 FIXME(
"Multi-adapter not supported.\n");
3852 TRACE(
"Heap serialisation tier %#x.\n",
data->HeapSerializationTier);
3860 if (feature_data_size !=
sizeof(*
data))
3862 WARN(
"Invalid size %u.\n", feature_data_size);
3866 data->SharingTier =
device->feature_options.CrossNodeSharingTier;
3869 TRACE(
"Cross node sharing tier %#x.\n",
data->SharingTier);
3870 TRACE(
"Cross node shader atomics %#x.\n",
data->AtomicShaderInstructions);
3878 if (feature_data_size !=
sizeof(*
data))
3880 WARN(
"Invalid size %u.\n", feature_data_size);
3886 TRACE(
"SRV tiled resource tier 3 only %#x.\n",
data->SRVOnlyTiledResourceTier3);
3887 TRACE(
"Render pass tier %#x.\n",
data->RenderPassesTier);
3888 TRACE(
"Ray tracing tier %#x.\n",
data->RaytracingTier);
3896 if (feature_data_size !=
sizeof(*
data))
3898 WARN(
"Invalid size %u.\n", feature_data_size);
3902 data->AdditionalShadingRatesSupported =
FALSE;
3903 data->PerPrimitiveShadingRateSupportedWithViewportIndexing =
FALSE;
3905 data->ShadingRateImageTileSize = 0;
3906 data->BackgroundProcessingSupported =
FALSE;
3908 TRACE(
"Additional shading rates support %#x.\n",
data->AdditionalShadingRatesSupported);
3909 TRACE(
"Per-primitive shading rates with viewport indexing %#x.\n",
3910 data->PerPrimitiveShadingRateSupportedWithViewportIndexing);
3911 TRACE(
"Variable shading rate tier %#x.\n",
data->VariableShadingRateTier);
3912 TRACE(
"Shading rate image tile size %#x.\n",
data->ShadingRateImageTileSize);
3913 TRACE(
"Background processing support %#x.\n",
data->BackgroundProcessingSupported);
3921 if (feature_data_size !=
sizeof(*
data))
3923 WARN(
"Invalid size %u.\n", feature_data_size);
3930 TRACE(
"Mesh shading tier %#x.\n",
data->MeshShaderTier);
3931 TRACE(
"Sampler feedback tier %#x.\n",
data->SamplerFeedbackTier);
3939 if (feature_data_size !=
sizeof(*
data))
3941 WARN(
"Invalid size %u.\n", feature_data_size);
3946 data->UnalignedBlockTexturesSupported =
TRUE;
3948 TRACE(
"Unaligned block texture support %#x.\n",
data->UnalignedBlockTexturesSupported);
3956 if (feature_data_size !=
sizeof(*
data))
3958 WARN(
"Invalid size %u.\n", feature_data_size);
3962 data->MeshShaderPipelineStatsSupported =
FALSE;
3963 data->MeshShaderSupportsFullRangeRenderTargetArrayIndex =
FALSE;
3964 data->AtomicInt64OnTypedResourceSupported =
FALSE;
3965 data->AtomicInt64OnGroupSharedSupported =
FALSE;
3966 data->DerivativesInMeshAndAmplificationShadersSupported =
FALSE;
3969 TRACE(
"Mesh shader pipeline stats support %#x.\n",
data->MeshShaderPipelineStatsSupported);
3970 TRACE(
"Mesh shader RT array index full range %#x.\n",
data->MeshShaderSupportsFullRangeRenderTargetArrayIndex);
3971 TRACE(
"Atomic int64 on typed resource %#x.\n",
data->AtomicInt64OnTypedResourceSupported);
3972 TRACE(
"Atomic int64 on group shared mem %#x.\n",
data->AtomicInt64OnGroupSharedSupported);
3973 TRACE(
"Derivatives in mesh and amp shaders %#x.\n",
data->DerivativesInMeshAndAmplificationShadersSupported);
3974 TRACE(
"Wave MMA tier %#x.\n",
data->WaveMMATier);
3982 if (feature_data_size !=
sizeof(*
data))
3984 WARN(
"Invalid size %u.\n", feature_data_size);
3988 data->VariableRateShadingSumCombinerSupported =
FALSE;
3989 data->MeshShaderPerPrimitiveShadingRateSupported =
FALSE;
3991 TRACE(
"Variable rate shading sum combiner %#x.\n",
data->VariableRateShadingSumCombinerSupported);
3992 TRACE(
"Mesh shader per primitive shading rate %#x.\n",
data->MeshShaderPerPrimitiveShadingRateSupported);
4000 if (feature_data_size !=
sizeof(*
data))
4002 WARN(
"Invalid size %u.\n", feature_data_size);
4006 data->AtomicInt64OnDescriptorHeapResourceSupported =
FALSE;
4008 TRACE(
"Atomic int64 on descriptor heap resource %#x.\n",
data->AtomicInt64OnDescriptorHeapResourceSupported);
4016 if (feature_data_size !=
sizeof(*
data))
4018 WARN(
"Invalid size %u.\n", feature_data_size);
4023 data->EnhancedBarriersSupported =
FALSE;
4024 data->RelaxedFormatCastingSupported =
FALSE;
4026 TRACE(
"Mesh shader primitives pipeline stats include cull primitives %#x.\n",
4027 data->MSPrimitivesPipelineStatisticIncludesCulledPrimitives);
4028 TRACE(
"Enhanced barriers %#x.\n",
data->EnhancedBarriersSupported);
4029 TRACE(
"Relaxed format casting %#x.\n",
data->RelaxedFormatCastingSupported);
4037 if (feature_data_size !=
sizeof(*
data))
4039 WARN(
"Invalid size %u.\n", feature_data_size);
4043 data->UnrestrictedBufferTextureCopyPitchSupported =
FALSE;
4044 data->UnrestrictedVertexElementAlignmentSupported =
FALSE;
4045 data->InvertedViewportHeightFlipsYSupported =
FALSE;
4046 data->InvertedViewportDepthFlipsZSupported =
FALSE;
4047 data->TextureCopyBetweenDimensionsSupported =
FALSE;
4048 data->AlphaBlendFactorSupported =
FALSE;
4050 TRACE(
"Unrestricted buffer-texture copy pitch %#x.\n",
data->UnrestrictedBufferTextureCopyPitchSupported);
4051 TRACE(
"Unrestricted vertex element alignment %#x.\n",
data->UnrestrictedVertexElementAlignmentSupported);
4052 TRACE(
"Inverted viewport height flips Y %#x.\n",
data->InvertedViewportHeightFlipsYSupported);
4053 TRACE(
"Inverted viewport depth flips Z %#x.\n",
data->InvertedViewportDepthFlipsZSupported);
4054 TRACE(
"Texture copy between dimensions %#x.\n",
data->TextureCopyBetweenDimensionsSupported);
4055 TRACE(
"Alpha blend factor support %#x.\n",
data->AlphaBlendFactorSupported);
4063 if (feature_data_size !=
sizeof(*
data))
4065 WARN(
"Invalid size %u.\n", feature_data_size);
4068 data->AdvancedTextureOpsSupported =
FALSE;
4069 data->WriteableMSAATexturesSupported =
FALSE;
4070 data->IndependentFrontAndBackStencilRefMaskSupported =
FALSE;
4072 TRACE(
"Advanced texture ops %#x.\n",
data->AdvancedTextureOpsSupported);
4073 TRACE(
"Writeable MSAA textures %#x.\n",
data->WriteableMSAATexturesSupported);
4074 TRACE(
"Independent front and back stencil ref mask %#x.\n",
data->IndependentFrontAndBackStencilRefMaskSupported);
4082 if (feature_data_size !=
sizeof(*
data))
4084 WARN(
"Invalid size %u.\n", feature_data_size);
4088 data->DynamicIndexBufferStripCutSupported =
FALSE;
4090 TRACE(
"Triangle fan %#x.\n",
data->TriangleFanSupported);
4091 TRACE(
"Dynamic index buffer strip cut %#x.\n",
data->DynamicIndexBufferStripCutSupported);
4099 if (feature_data_size !=
sizeof(*
data))
4101 WARN(
"Invalid size %u.\n", feature_data_size);
4104 data->DynamicDepthBiasSupported =
FALSE;
4107 TRACE(
"Dynamic depth bias %#x.\n",
data->DynamicDepthBiasSupported);
4108 TRACE(
"GPU upload heap %#x.\n",
data->GPUUploadHeapSupported);
4116 if (feature_data_size !=
sizeof(*
data))
4118 WARN(
"Invalid size %u.\n", feature_data_size);
4121 data->NonNormalizedCoordinateSamplersSupported =
FALSE;
4122 data->ManualWriteTrackingResourceSupported =
FALSE;
4124 TRACE(
"Non-normalized coordinate samplers %#x.\n",
data->NonNormalizedCoordinateSamplersSupported);
4125 TRACE(
"Manual write tracking resource %#x.\n",
data->ManualWriteTrackingResourceSupported);
4133 if (feature_data_size !=
sizeof(*
data))
4135 WARN(
"Invalid size %u.\n", feature_data_size);
4140 TRACE(
"Render passes valid %#x.\n",
data->RenderPassesValid);
4157 TRACE(
"iface %p, desc %p, riid %s, descriptor_heap %p.\n",
4164 &IID_ID3D12DescriptorHeap,
riid, descriptor_heap);
4170 TRACE(
"iface %p, descriptor_heap_type %#x.\n", iface, descriptor_heap_type);
4172 switch (descriptor_heap_type)
4185 FIXME(
"Unhandled type %#x.\n", descriptor_heap_type);
4191 UINT node_mask,
const void *bytecode,
SIZE_T bytecode_length,
4198 TRACE(
"iface %p, node_mask 0x%08x, bytecode %p, bytecode_length %"PRIuPTR", riid %s, root_signature %p.\n",
4207 &IID_ID3D12RootSignature,
riid, root_signature);
4229 TRACE(
"iface %p, resource %p, desc %p, descriptor %s.\n",
4243 TRACE(
"iface %p, resource %p, counter_resource %p, desc %p, descriptor %s.\n",
4255 TRACE(
"iface %p, resource %p, desc %p, descriptor %s.\n",
4266 TRACE(
"iface %p, resource %p, desc %p, descriptor %s.\n",
4287 const UINT *dst_descriptor_range_sizes,
4289 const UINT *src_descriptor_range_sizes,
4293 unsigned int dst_range_idx, dst_idx, src_range_idx, src_idx;
4294 unsigned int dst_range_size, src_range_size;
4299 TRACE(
"iface %p, dst_descriptor_range_count %u, dst_descriptor_range_offsets %p, "
4300 "dst_descriptor_range_sizes %p, src_descriptor_range_count %u, "
4301 "src_descriptor_range_offsets %p, src_descriptor_range_sizes %p, "
4302 "descriptor_heap_type %#x.\n",
4303 iface, dst_descriptor_range_count, dst_descriptor_range_offsets,
4304 dst_descriptor_range_sizes, src_descriptor_range_count, src_descriptor_range_offsets,
4305 src_descriptor_range_sizes, descriptor_heap_type);
4310 FIXME(
"Unhandled descriptor heap type %#x.\n", descriptor_heap_type);
4314 if (!dst_descriptor_range_count)
4317 dst_range_idx = dst_idx = 0;
4318 src_range_idx = src_idx = 0;
4319 while (dst_range_idx < dst_descriptor_range_count && src_range_idx < src_descriptor_range_count)
4321 dst_range_size = dst_descriptor_range_sizes ? dst_descriptor_range_sizes[dst_range_idx] : 1;
4322 src_range_size = src_descriptor_range_sizes ? src_descriptor_range_sizes[src_range_idx] : 1;
4328 for (; dst_idx < dst_range_size && src_idx < src_range_size; ++dst_idx, ++src_idx)
4330 if (
dst[dst_idx].
s.u.object ==
src[src_idx].s.u.object)
4335 if (dst_idx >= dst_range_size)
4340 if (src_idx >= src_range_size)
4353 TRACE(
"iface %p, descriptor_count %u, dst_descriptor_range_offset %s, "
4354 "src_descriptor_range_offset %s, descriptor_heap_type %#x.\n",
4359 1, &src_descriptor_range_offset, &descriptor_count, descriptor_heap_type);
4386 desc = &resource_descs[
i];
4390 WARN(
"Invalid resource desc.\n");
4404 WARN(
"Failed to get allocation info for texture.\n");
4408 requested_alignment =
desc->Alignment
4410 info.alignment =
max(
info.alignment, requested_alignment);
4416 if (
info.alignment > requested_alignment)
4418 info.size_in_bytes +=
info.alignment - requested_alignment;
4419 info.alignment = requested_alignment;
4440 if (
desc->SampleDesc.Count != 1)
4459 descs1 = resource_descs1;
4463 ERR(
"Failed to allocate %u resource descriptions.\n",
count);
4474 if (descs1 != resource_descs1)
4484 TRACE(
"iface %p, info %p, visible_mask 0x%08x, count %u, resource_descs %p.\n",
4485 iface,
info, visible_mask,
count, resource_descs);
4500 TRACE(
"iface %p, heap_properties %p, node_mask 0x%08x, heap_type %#x.\n",
4501 iface, heap_properties, node_mask, heap_type);
4527 FIXME(
"Unhandled heap type %#x.\n", heap_type);
4534 return heap_properties;
4547 TRACE(
"iface %p, heap_properties %p, heap_flags %#x, desc %p, initial_state %#x, "
4548 "optimized_clear_value %p, iid %s, resource %p.\n",
4571 TRACE(
"iface %p, desc %p, iid %s, heap %p.\n",
4594 TRACE(
"iface %p, heap %p, heap_offset %#"PRIx64", desc %p, initial_state %#x, "
4595 "optimized_clear_value %p, iid %s, resource %p.\n",
4603 &resource_desc,
initial_state, optimized_clear_value, &
object)))
4618 TRACE(
"iface %p, desc %p, initial_state %#x, optimized_clear_value %p, iid %s, resource %p.\n",
4624 &resource_desc,
initial_state, optimized_clear_value, &
object)))
4636 FIXME(
"iface %p, object %p, attributes %p, access %#x, name %s, handle %p stub!\n",
4645 FIXME(
"iface %p, handle %p, riid %s, object %p stub!\n",
4656 FIXME(
"iface %p, name %s, access %#x, handle %p stub!\n",
4670 if (
FAILED(
hr = ID3D12Device9_CreateFence(iface, 0, 0, &IID_ID3D12Fence, (
void **)&fence)))
4675 ID3D12Fence_SetEventOnCompletion(fence, 1,
NULL);
4676 ID3D12Fence_Release(fence);
4683 FIXME_ONCE(
"iface %p, object_count %u, objects %p stub!\n",
4696 TRACE(
"iface %p, initial_value %#"PRIx64", flags %#x, riid %s, fence %p.\n",
4709 TRACE(
"iface %p.\n", iface);
4711 return device->removed_reason;
4719 unsigned int i, sub_resource_idx, miplevel_idx, row_count, row_size, row_pitch;
4725 memset(layouts, 0xff,
sizeof(*layouts) * sub_resource_count);
4727 memset(row_counts, 0xff,
sizeof(*row_counts) * sub_resource_count);
4729 memset(row_sizes, 0xff,
sizeof(*row_sizes) * sub_resource_count);
4735 WARN(
"Invalid format %#x.\n",
desc->Format);
4741 WARN(
"Invalid resource desc.\n");
4751 WARN(
"Invalid sub-resource range %u-%u for resource.\n", first_sub_resource, sub_resource_count);
4757 for (
i = 0;
i < sub_resource_count; ++
i)
4759 sub_resource_idx = (first_sub_resource +
i) % sub_resources_per_plane;
4760 miplevel_idx = sub_resource_idx %
desc->MipLevels;
4778 row_counts[
i] = row_count;
4780 row_sizes[
i] = row_size;
4782 size =
max(0, row_count - 1) * row_pitch + row_size;
4789 *total_bytes =
total;
4800 TRACE(
"iface %p, desc %p, first_sub_resource %u, sub_resource_count %u, base_offset %#"PRIx64", "
4801 "layouts %p, row_counts %p, row_sizes %p, total_bytes %p.\n",
4802 iface,
desc, first_sub_resource, sub_resource_count, base_offset,
4803 layouts, row_counts, row_sizes, total_bytes);
4808 base_offset, layouts, row_counts, row_sizes, total_bytes);
4818 TRACE(
"iface %p, desc %p, iid %s, heap %p.\n",
4829 FIXME(
"iface %p, enable %#x stub!\n", iface,
enable);
4836 REFIID iid,
void **command_signature)
4842 TRACE(
"iface %p, desc %p, root_signature %p, iid %s, command_signature %p.\n",
4849 &IID_ID3D12CommandSignature, iid, command_signature);
4855 UINT *sub_resource_tiling_count,
UINT first_sub_resource_tiling,
4861 TRACE(
"iface %p, resource %p, total_tile_count %p, packed_mip_info %p, "
4862 "standard_title_shape %p, sub_resource_tiling_count %p, "
4863 "first_sub_resource_tiling %u, sub_resource_tilings %p.\n",
4864 iface,
resource, total_tile_count, packed_mip_info, standard_tile_shape,
4865 sub_resource_tiling_count, first_sub_resource_tiling,
4866 sub_resource_tilings);
4869 sub_resource_tiling_count, first_sub_resource_tiling, sub_resource_tilings);
4876 TRACE(
"iface %p, luid %p.\n", iface, luid);
4878 *luid =
device->adapter_luid;
4886 FIXME(
"iface %p, blob %p, blob_size %"PRIuPTR", iid %s, lib %p stub!\n",
4896 FIXME(
"iface %p, fences %p, values %p, fence_count %u, flags %#x, event %p stub!\n",
4917 TRACE(
"iface %p, desc %p, iid %s, pipeline_state %p.\n", iface,
desc,
debugstr_guid(iid), pipeline_state);
4922 return return_interface(&
object->ID3D12PipelineState_iface, &IID_ID3D12PipelineState, iid, pipeline_state);
4936 FIXME(
"iface %p, file_mapping %p, iid %s, heap %p stub!\n", iface, file_mapping,
debugstr_guid(iid),
heap);
4945 FIXME_ONCE(
"iface %p, flags %#x, num_objects %u, objects %p, fence %p, fence_value %#"PRIx64" stub!\n",
4946 iface,
flags, num_objects,
objects, fence, fence_value);
4948 ID3D12Fence_Signal(fence, fence_value);
4954 REFIID iid,
void **command_list)
4956 FIXME(
"iface %p, node_mask 0x%08x, type %#x, flags %#x, iid %s, command_list %p stub!\n",
4981 TRACE(
"iface %p, heap_properties %p, heap_flags %#x, desc %p, initial_state %#x, "
4982 "optimized_clear_value %p, protected_session %p, iid %s, resource %p.\n",
4989 &resource_desc,
initial_state, optimized_clear_value, protected_session, &
object)))
5006 TRACE(
"iface %p, desc %p, protected_session %p, iid %s, heap %p.\n",
5023 FIXME(
"iface %p, desc %p, initial_state %#x, optimized_clear_value %p, "
5024 "protected_session %p, iid %s, resource %p stub!\n",
5025 iface,
desc, initial_state, optimized_clear_value, protected_session,
5038 TRACE(
"iface %p, info %p, visible_mask 0x%08x, count %u, resource_descs %p, info1 %p.\n",
5039 iface,
info, visible_mask,
count, resource_descs, info1);
5051 FIXME(
"iface %p, owner %p, iid %s, tracker %p stub!\n", iface, owner,
debugstr_guid(iid), tracker);
5058 FIXME(
"iface %p stub!\n", iface);
5064 FIXME(
"iface %p, num_meta_commands %p, command_desc %p stub!\n", iface,
5065 num_meta_commands, command_desc);
5072 UINT *size_in_bytes,
UINT *parameter_count,
5075 FIXME(
"iface %p, command_id %s, stage %u, size_in_bytes %p, "
5076 "parameter_count %p, parameter_desc %p stub!\n", iface,
5077 debugstr_guid(command_id), stage, size_in_bytes, parameter_count, parameter_desc);
5083 REFGUID command_id,
UINT node_mask,
const void *parameters_data,
5084 SIZE_T data_size_in_bytes,
REFIID iid,
void **meta_command)
5086 FIXME(
"iface %p, command_id %s, node_mask %#x, parameters_data %p, "
5087 "data_size_in_bytes %"PRIuPTR", iid %s, meta_command %p stub!\n", iface,
5097 FIXME(
"iface %p, desc %p, iid %s, state_object %p stub!\n", iface,
desc,
debugstr_guid(iid), state_object);
5106 FIXME(
"iface %p, desc %p, info %p stub!\n", iface,
desc,
info);
5112 FIXME(
"iface %p, data_type %u, identifier %p stub!\n", iface,
data_type, identifier);
5119 BOOL *further_measurements_desired)
5121 FIXME(
"iface %p, mode %#x, action %#x, event %p, further_measurements_desired %p stub!\n",
5132 FIXME(
"iface %p, addition %p, state_object_to_grow_from %p, riid %s, new_state_object %p stub!\n",
5133 iface, addition, state_object_to_grow_from,
debugstr_guid(
riid), new_state_object);
5152 TRACE(
"iface %p, info %p, visible_mask 0x%08x, count %u, resource_descs %p, info1 %p.\n",
5153 iface,
info, visible_mask,
count, resource_descs, info1);
5171 TRACE(
"iface %p, heap_properties %p, heap_flags %#x, desc %p, initial_state %#x, "
5172 "optimized_clear_value %p, protected_session %p, iid %s, resource %p.\n",
5196 TRACE(
"iface %p, heap %p, heap_offset %#"PRIx64", desc %p, initial_state %#x, "
5197 "optimized_clear_value %p, iid %s, resource %p.\n",
5204 resource_desc,
initial_state, optimized_clear_value, &
object)))
5213 FIXME(
"iface %p, target_resource %p, feedback_resource %p, descriptor %s stub!\n",
5224 TRACE(
"iface %p, desc %p, first_sub_resource %u, sub_resource_count %u, base_offset %#"PRIx64", "
5225 "layouts %p, row_counts %p, row_sizes %p, total_bytes %p.\n",
5226 iface,
desc, first_sub_resource, sub_resource_count, base_offset,
5227 layouts, row_counts, row_sizes, total_bytes);
5230 base_offset, layouts, row_counts, row_sizes, total_bytes);
5238 static const GUID guid_null = {0};
5248 WARN(
"No description or identifier, returning E_INVALIDARG.\n");
5251 if (
desc->MaximumValueFileSizeBytes > 1024 * 1024 * 1024)
5253 WARN(
"Requested size is larger than 1GiB, returning E_INVALIDARG.\n");
5256 if (
desc->Flags & ~valid_flags)
5258 WARN(
"Invalid flags %#x, returning E_INVALIDARG.\n",
desc->Flags);
5263 WARN(
"Invalid mode %#x, returning E_INVALIDARG.\n",
desc->Mode);
5268 WARN(
"No output pointer, returning S_FALSE.\n");
5282 hr = ID3D12ShaderCacheSession_QueryInterface(&
object->ID3D12ShaderCacheSession_iface, iid,
5284 ID3D12ShaderCacheSession_Release(&
object->ID3D12ShaderCacheSession_iface);
5291 FIXME(
"iface %p, kinds %#x control %#x stub!\n", iface, kinds,
control);
5298 void **command_queue)
5300 FIXME(
"iface %p, desc %p, creator %s, iid %s, queue %p stub!\n", iface,
desc,
5416 while (!
device->worker_should_exit)
5418 for (
i = 0;
i <
device->heap_count; ++
i)
5462 device->heap_capacity = 0;
5465 device->worker_should_exit =
false;
5470 goto out_free_instance;
5473 goto out_free_vk_resources;
5476 goto out_free_pipeline_cache;
5479 goto out_free_private_store;
5482 goto out_cleanup_format_info;
5485 goto out_destroy_null_resources;
5488 goto out_cleanup_uav_clear_state;
5494 goto out_cleanup_descriptor_heap_layouts;
5501 device->blocked_queue_count = 0;
5510 IUnknown_AddRef(
device->parent);
5514out_cleanup_descriptor_heap_layouts:
5516out_cleanup_uav_clear_state:
5518out_destroy_null_resources:
5520out_cleanup_format_info:
5522out_free_private_store:
5524out_free_pipeline_cache:
5526out_free_vk_resources:
5527 vk_procs = &
device->vk_procs;
5549 TRACE(
"Created device %p.\n",
object);
5562 WARN(
"Device %p is lost (reason %s, \"%s\").\n",
5592 for (
i = 0;
i <
device->heap_count; ++
i)
5629 ERR(
"Failed to create thread.\n");
5654 ERR(
"Failed to create thread, error %d.\n", rc);
5678 ERR(
"Failed to wait for thread, ret %#x.\n", rc);
5683 if ((rc = pthread_join(
thread->pthread,
NULL)))
5685 ERR(
"Failed to join thread, error %d.\n", rc);
COMPILER_DEPENDENT_UINT64 UINT64
_Check_return_ _Ret_maybenull_ _In_ size_t alignment
static void list_remove(struct list_entry *entry)
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
#define STDMETHODCALLTYPE
void vkd3d_queue_destroy(struct vkd3d_queue *queue, struct d3d12_device *device)
HRESULT d3d12_fence_create(struct d3d12_device *device, uint64_t initial_value, D3D12_FENCE_FLAGS flags, struct d3d12_fence **fence)
HRESULT d3d12_command_list_create(struct d3d12_device *device, UINT node_mask, D3D12_COMMAND_LIST_TYPE type, ID3D12CommandAllocator *allocator_iface, ID3D12PipelineState *initial_pipeline_state, struct d3d12_command_list **list)
HRESULT d3d12_command_allocator_create(struct d3d12_device *device, D3D12_COMMAND_LIST_TYPE type, struct d3d12_command_allocator **allocator)
HRESULT d3d12_command_queue_create(struct d3d12_device *device, const D3D12_COMMAND_QUEUE_DESC *desc, struct d3d12_command_queue **queue)
HRESULT vkd3d_queue_create(struct d3d12_device *device, uint32_t family_index, const VkQueueFamilyProperties *properties, struct vkd3d_queue **queue)
HRESULT d3d12_command_signature_create(struct d3d12_device *device, const D3D12_COMMAND_SIGNATURE_DESC *desc, struct d3d12_command_signature **signature)
const INT D3D12_VIEWPORT_BOUNDS_MIN
D3D12_SERIALIZED_DATA_TYPE
@ D3D12_HEAP_SERIALIZATION_TIER_0
D3D12_MULTIPLE_FENCE_WAIT_FLAGS
const UINT D3D12_COMMONSHADER_CONSTANT_BUFFER_REGISTER_COUNT
@ D3D12_FORMAT_SUPPORT1_TEXTURE1D
@ D3D12_FORMAT_SUPPORT1_IA_INDEX_BUFFER
@ D3D12_FORMAT_SUPPORT1_TEXTURECUBE
@ D3D12_FORMAT_SUPPORT1_SHADER_SAMPLE_COMPARISON
@ D3D12_FORMAT_SUPPORT1_MULTISAMPLE_RENDERTARGET
@ D3D12_FORMAT_SUPPORT1_RENDER_TARGET
@ D3D12_FORMAT_SUPPORT1_MULTISAMPLE_LOAD
@ D3D12_FORMAT_SUPPORT1_SHADER_GATHER_COMPARISON
@ D3D12_FORMAT_SUPPORT1_BLENDABLE
@ D3D12_FORMAT_SUPPORT1_BUFFER
@ D3D12_FORMAT_SUPPORT1_MIP
@ D3D12_FORMAT_SUPPORT1_IA_VERTEX_BUFFER
@ D3D12_FORMAT_SUPPORT1_NONE
@ D3D12_FORMAT_SUPPORT1_TEXTURE3D
@ D3D12_FORMAT_SUPPORT1_SHADER_GATHER
@ D3D12_FORMAT_SUPPORT1_TEXTURE2D
@ D3D12_FORMAT_SUPPORT1_TYPED_UNORDERED_ACCESS_VIEW
@ D3D12_FORMAT_SUPPORT1_DEPTH_STENCIL
@ D3D12_FORMAT_SUPPORT1_SHADER_SAMPLE
@ D3D12_FORMAT_SUPPORT1_MULTISAMPLE_RESOLVE
@ D3D12_FORMAT_SUPPORT1_SHADER_LOAD
@ D3D_HIGHEST_SHADER_MODEL
@ D3D12_SHARED_RESOURCE_COMPATIBILITY_TIER_0
@ D3D_ROOT_SIGNATURE_VERSION_1_0
@ D3D_ROOT_SIGNATURE_VERSION_1_1
@ D3D12_RAYTRACING_TIER_NOT_SUPPORTED
@ D3D12_SHADER_CACHE_FLAG_USE_WORKING_DIR
@ D3D12_SHADER_CACHE_FLAG_DRIVER_VERSIONED
@ D3D12_TILED_RESOURCES_TIER_NOT_SUPPORTED
@ D3D12_TILED_RESOURCES_TIER_1
@ D3D12_TILED_RESOURCES_TIER_2
@ D3D12_TILED_RESOURCES_TIER_3
const UINT D3D12_UAV_SLOT_COUNT
D3D12_META_COMMAND_PARAMETER_STAGE
@ D3D12_CONSERVATIVE_RASTERIZATION_TIER_NOT_SUPPORTED
@ D3D12_CONSERVATIVE_RASTERIZATION_TIER_1
@ D3D12_SHADER_MIN_PRECISION_SUPPORT_NONE
const UINT D3D12_MAX_ROOT_COST
@ D3D12_WAVE_MMA_TIER_NOT_SUPPORTED
@ D3D12_COMMAND_LIST_TYPE_COPY
@ D3D12_COMMAND_LIST_TYPE_DIRECT
@ D3D12_COMMAND_LIST_TYPE_COMPUTE
const UINT D3D12_CS_TGSM_REGISTER_COUNT
@ D3D12_RESOURCE_DIMENSION_BUFFER
@ D3D12_RESOURCE_DIMENSION_TEXTURE2D
@ D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET
const UINT D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT
@ D3D12_VARIABLE_SHADING_RATE_TIER_NOT_SUPPORTED
const UINT D3D12_VIEWPORT_BOUNDS_MAX
D3D12_DRIVER_MATCHING_IDENTIFIER_STATUS
@ D3D12_DRIVER_MATCHING_IDENTIFIER_UNRECOGNIZED
const UINT D3D12_TEXTURE_DATA_PITCH_ALIGNMENT
const UINT D3D12_MAX_LIVE_STATIC_SAMPLERS
@ D3D12_PROGRAMMABLE_SAMPLE_POSITIONS_TIER_NOT_SUPPORTED
@ D3D12_TRI_STATE_UNKNOWN
@ D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_EXCHANGE
@ D3D12_FORMAT_SUPPORT2_NONE
@ D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_SIGNED_MIN_OR_MAX
@ D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_COMPARE_STORE_OR_COMPARE_EXCHANGE
@ D3D12_FORMAT_SUPPORT2_UAV_TYPED_LOAD
@ D3D12_FORMAT_SUPPORT2_UAV_TYPED_STORE
@ D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_BITWISE_OPS
@ D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_UNSIGNED_MIN_OR_MAX
@ D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_ADD
@ D3D12_RENDER_PASS_TIER_0
@ D3D12_CPU_PAGE_PROPERTY_WRITE_BACK
@ D3D12_CPU_PAGE_PROPERTY_WRITE_COMBINE
@ D3D12_CPU_PAGE_PROPERTY_NOT_AVAILABLE
@ D3D12_VIEW_INSTANCING_TIER_NOT_SUPPORTED
@ D3D12_SAMPLER_FEEDBACK_TIER_NOT_SUPPORTED
D3D12_MEASUREMENTS_ACTION
const UINT D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT
D3D12_DESCRIPTOR_HEAP_TYPE
@ D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV
@ D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER
@ D3D12_DESCRIPTOR_HEAP_TYPE_RTV
@ D3D12_DESCRIPTOR_HEAP_TYPE_DSV
@ D3D12_RESOURCE_BINDING_TIER_3
@ D3D12_RESOURCE_BINDING_TIER_1
@ D3D12_RESOURCE_BINDING_TIER_2
@ D3D12_MESH_SHADER_TIER_NOT_SUPPORTED
D3D12_SHADER_CACHE_CONTROL_FLAGS
@ D3D12_SHADER_CACHE_SUPPORT_NONE
@ D3D12_CROSS_NODE_SHARING_TIER_NOT_SUPPORTED
const UINT D3D12_DEFAULT_MSAA_RESOURCE_PLACEMENT_ALIGNMENT
@ D3D12_COMMAND_LIST_SUPPORT_FLAG_NONE
@ D3D12_HEAP_TYPE_DEFAULT
@ D3D12_HEAP_TYPE_READBACK
@ D3D12_RESOURCE_HEAP_TIER_2
@ D3D12_FEATURE_D3D12_OPTIONS9
@ D3D12_FEATURE_D3D12_OPTIONS8
@ D3D12_FEATURE_FORMAT_SUPPORT
@ D3D12_FEATURE_FEATURE_LEVELS
@ D3D12_FEATURE_FORMAT_INFO
@ D3D12_FEATURE_D3D12_OPTIONS16
@ D3D12_FEATURE_D3D12_OPTIONS18
@ D3D12_FEATURE_D3D12_OPTIONS
@ D3D12_FEATURE_D3D12_OPTIONS2
@ D3D12_FEATURE_SHADER_CACHE
@ D3D12_FEATURE_SHADER_MODEL
@ D3D12_FEATURE_EXISTING_HEAPS
@ D3D12_FEATURE_D3D12_OPTIONS3
@ D3D12_FEATURE_ARCHITECTURE
@ D3D12_FEATURE_D3D12_OPTIONS6
@ D3D12_FEATURE_COMMAND_QUEUE_PRIORITY
@ D3D12_FEATURE_D3D12_OPTIONS7
@ D3D12_FEATURE_D3D12_OPTIONS13
@ D3D12_FEATURE_ARCHITECTURE1
@ D3D12_FEATURE_D3D12_OPTIONS11
@ D3D12_FEATURE_MULTISAMPLE_QUALITY_LEVELS
@ D3D12_FEATURE_D3D12_OPTIONS15
@ D3D12_FEATURE_D3D12_OPTIONS4
@ D3D12_FEATURE_GPU_VIRTUAL_ADDRESS_SUPPORT
@ D3D12_FEATURE_D3D12_OPTIONS12
@ D3D12_FEATURE_ROOT_SIGNATURE
@ D3D12_FEATURE_D3D12_OPTIONS17
@ D3D12_FEATURE_D3D12_OPTIONS1
@ D3D12_FEATURE_CROSS_NODE
@ D3D12_FEATURE_SERIALIZATION
@ D3D12_FEATURE_D3D12_OPTIONS5
@ D3D12_FEATURE_D3D12_OPTIONS10
@ D3D12_FEATURE_D3D12_OPTIONS14
UINT64 D3D12_GPU_VIRTUAL_ADDRESS
static HRESULT hresult_from_vkd3d_result(int vkd3d_result)
static HINSTANCE instance
static WCHAR reason[MAX_STRING_RESOURCE_LEN]
static API_VERSION api_version
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
char *CDECL getenv(const char *name)
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
_ACRTIMP size_t __cdecl strlen(const char *)
_ACRTIMP int __cdecl strcmp(const char *, const char *)
_ACRTIMP int __cdecl strncmp(const char *, const char *, size_t)
static HRESULT hresult_from_vk_result(VkResult vr)
GLint GLint GLsizei GLsizei GLsizei depth
GLuint GLuint GLsizei count
GLint GLint GLsizei GLsizei height
GLuint GLuint GLsizei GLenum type
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLint GLint GLsizei width
GLboolean GLenum GLenum GLvoid * values
GLuint GLint GLboolean GLint GLenum access
const GLuint const GLclampf * priorities
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
enum wined3d_data_type data_type
#define memcpy(s1, s2, n)
#define memmove(s1, s2, n)
static const CLSID * objects[]
static IPrintDialogCallback callback
D3D11_SHADER_VARIABLE_DESC desc
static RPC_BINDING_HANDLE binding
INTERNETFEATURELIST feature
static unsigned int WINAPI thread_main(void *args)
static HANDLE ACCESS_MASK ULONG attributes
#define IsEqualGUID(rguid1, rguid2)
static unsigned __int64 next
#define offsetof(TYPE, MEMBER)
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
int vkd3d_shader_cache_put(struct vkd3d_shader_cache *cache, const void *key, size_t key_size, const void *value, size_t value_size)
int vkd3d_shader_cache_get(struct vkd3d_shader_cache *cache, const void *key, size_t key_size, void *value, size_t *value_size)
unsigned int vkd3d_shader_cache_incref(struct vkd3d_shader_cache *cache)
unsigned int vkd3d_shader_cache_decref(struct vkd3d_shader_cache *cache)
int vkd3d_shader_open_cache(struct vkd3d_shader_cache **cache)
#define vkd3d_find_struct(c, t)
void d3d12_device_mark_as_removed(struct d3d12_device *device, HRESULT reason, const char *message,...)
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateHeap1(ID3D12Device9 *iface, const D3D12_HEAP_DESC *desc, ID3D12ProtectedResourceSession *protected_session, REFIID iid, void **heap)
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateQueryHeap(ID3D12Device9 *iface, const D3D12_QUERY_HEAP_DESC *desc, REFIID iid, void **heap)
static const struct vkd3d_debug_option vkd3d_config_options[]
static uint32_t vkd3d_get_vk_version(void)
static UINT STDMETHODCALLTYPE d3d12_device_GetDescriptorHandleIncrementSize(ID3D12Device9 *iface, D3D12_DESCRIPTOR_HEAP_TYPE descriptor_heap_type)
static void * vkd3d_gpu_va_allocator_dereference_fallback(struct vkd3d_gpu_va_allocator *allocator, D3D12_GPU_VIRTUAL_ADDRESS address)
void vkd3d_gpu_va_allocator_free(struct vkd3d_gpu_va_allocator *allocator, D3D12_GPU_VIRTUAL_ADDRESS address)
static ULONG STDMETHODCALLTYPE d3d12_cache_session_AddRef(ID3D12ShaderCacheSession *iface)
static HRESULT device_worker_stop(struct d3d12_device *device)
static const char *const required_device_extensions[]
#define VKD3D_VA_FALLBACK_BASE
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateCommandAllocator(ID3D12Device9 *iface, D3D12_COMMAND_LIST_TYPE type, REFIID riid, void **command_allocator)
@ VKD3D_QUEUE_FAMILY_DIRECT
@ VKD3D_QUEUE_FAMILY_COUNT
@ VKD3D_QUEUE_FAMILY_COMPUTE
@ VKD3D_QUEUE_FAMILY_TRANSFER
#define CHECK_FEATURE(name)
static void STDMETHODCALLTYPE d3d12_device_CreateShaderResourceView(ID3D12Device9 *iface, ID3D12Resource *resource, const D3D12_SHADER_RESOURCE_VIEW_DESC *desc, D3D12_CPU_DESCRIPTOR_HANDLE descriptor)
static void vkd3d_init_feature_level(struct vkd3d_vulkan_info *vk_info, const VkPhysicalDeviceFeatures *features, const D3D12_FEATURE_DATA_D3D12_OPTIONS *d3d12_options)
VkPhysicalDevice vkd3d_get_vk_physical_device(ID3D12Device *device)
static void d3d12_resource_allocation_info1_from_vkd3d(D3D12_RESOURCE_ALLOCATION_INFO1 *result, const struct vkd3d_resource_allocation_info *info)
static HRESULT STDMETHODCALLTYPE d3d12_device_CheckFeatureSupport(ID3D12Device9 *iface, D3D12_FEATURE feature, void *feature_data, UINT feature_data_size)
static D3D12_GPU_VIRTUAL_ADDRESS vkd3d_gpu_va_allocator_allocate_fallback(struct vkd3d_gpu_va_allocator *allocator, size_t alignment, uint64_t aligned_size, void *ptr)
static D3D12_HEAP_PROPERTIES *STDMETHODCALLTYPE d3d12_device_GetCustomHeapProperties(ID3D12Device9 *iface, D3D12_HEAP_PROPERTIES *heap_properties, UINT node_mask, D3D12_HEAP_TYPE heap_type)
static bool has_extension(const VkExtensionProperties *extensions, unsigned int count, const char *extension_name)
static HRESULT STDMETHODCALLTYPE d3d12_device_SetBackgroundProcessingMode(ID3D12Device9 *iface, D3D12_BACKGROUND_PROCESSING_MODE mode, D3D12_MEASUREMENTS_ACTION action, HANDLE event, BOOL *further_measurements_desired)
static HRESULT vkd3d_check_device_extensions(struct d3d12_device *device, const struct vkd3d_device_create_info *create_info, VkExtensionProperties **vk_extensions, uint32_t *vk_extension_count, uint32_t *device_extension_count, bool **user_extension_supported)
static void d3d12_device_destroy_vkd3d_queues(struct d3d12_device *device)
static D3D12_DRIVER_MATCHING_IDENTIFIER_STATUS STDMETHODCALLTYPE d3d12_device_CheckDriverMatchingIdentifier(ID3D12Device9 *iface, D3D12_SERIALIZED_DATA_TYPE data_type, const D3D12_SERIALIZED_DATA_DRIVER_MATCHING_IDENTIFIER *identifier)
static void vkd3d_destroy_instance(struct vkd3d_instance *instance)
static void * device_worker_main(void *arg)
static const struct ID3D12ShaderCacheSessionVtbl d3d12_cache_session_vtbl
static HRESULT STDMETHODCALLTYPE d3d12_device_SetStablePowerState(ID3D12Device9 *iface, BOOL enable)
static D3D12_RESOURCE_ALLOCATION_INFO *STDMETHODCALLTYPE d3d12_device_GetResourceAllocationInfo1(ID3D12Device9 *iface, D3D12_RESOURCE_ALLOCATION_INFO *info, UINT visible_mask, UINT count, const D3D12_RESOURCE_DESC *resource_descs, D3D12_RESOURCE_ALLOCATION_INFO1 *info1)
static void vkd3d_vk_descriptor_heap_layouts_cleanup(struct d3d12_device *device)
static HRESULT vkd3d_vk_descriptor_heap_layouts_init(struct d3d12_device *device)
static HRESULT vkd3d_instance_init(struct vkd3d_instance *instance, const struct vkd3d_instance_create_info *create_info)
static struct vkd3d_mutex cache_list_mutex
static unsigned int vkd3d_append_extension(const char *extensions[], unsigned int extension_count, const char *extension_name)
static HRESULT STDMETHODCALLTYPE d3d12_device_SetName(ID3D12Device9 *iface, const WCHAR *name)
static void d3d12_cache_session_destroy(struct d3d12_cache_session *session)
static HRESULT vkd3d_init_vk_global_procs(struct vkd3d_instance *instance, PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr)
static void STDMETHODCALLTYPE d3d12_device_GetCopyableFootprints1(ID3D12Device9 *iface, const D3D12_RESOURCE_DESC1 *desc, UINT first_sub_resource, UINT sub_resource_count, UINT64 base_offset, D3D12_PLACED_SUBRESOURCE_FOOTPRINT *layouts, UINT *row_counts, UINT64 *row_sizes, UINT64 *total_bytes)
static HRESULT STDMETHODCALLTYPE d3d12_device_SetEventOnMultipleFenceCompletion(ID3D12Device9 *iface, ID3D12Fence *const *fences, const UINT64 *values, UINT fence_count, D3D12_MULTIPLE_FENCE_WAIT_FLAGS flags, HANDLE event)
static HRESULT d3d12_device_check_multisample_quality_levels(struct d3d12_device *device, D3D12_FEATURE_DATA_MULTISAMPLE_QUALITY_LEVELS *data)
static struct d3d12_cache_session * impl_from_ID3D12ShaderCacheSession(ID3D12ShaderCacheSession *iface)
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateProtectedResourceSession(ID3D12Device9 *iface, const D3D12_PROTECTED_RESOURCE_SESSION_DESC *desc, REFIID iid, void **session)
static void vkd3d_trace_physical_device_properties(const VkPhysicalDeviceProperties *properties)
static HRESULT STDMETHODCALLTYPE d3d12_cache_session_SetPrivateData(ID3D12ShaderCacheSession *iface, REFGUID guid, UINT data_size, const void *data)
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateGraphicsPipelineState(ID3D12Device9 *iface, const D3D12_GRAPHICS_PIPELINE_STATE_DESC *desc, REFIID riid, void **pipeline_state)
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateHeap(ID3D12Device9 *iface, const D3D12_HEAP_DESC *desc, REFIID iid, void **heap)
static void STDMETHODCALLTYPE d3d12_device_CreateRenderTargetView(ID3D12Device9 *iface, ID3D12Resource *resource, const D3D12_RENDER_TARGET_VIEW_DESC *desc, D3D12_CPU_DESCRIPTOR_HANDLE descriptor)
static void vkd3d_desc_object_cache_init(struct vkd3d_desc_object_cache *cache, size_t size)
static HRESULT STDMETHODCALLTYPE d3d12_device_Evict(ID3D12Device9 *iface, UINT object_count, ID3D12Pageable *const *objects)
static unsigned int vkd3d_check_extensions(const VkExtensionProperties *extensions, unsigned int count, const char *const *required_extensions, unsigned int required_extension_count, const struct vkd3d_optional_extension_info *optional_extensions, unsigned int optional_extension_count, const char *const *user_extensions, unsigned int user_extension_count, const char *const *optional_user_extensions, unsigned int optional_user_extension_count, bool *user_extension_supported, struct vkd3d_vulkan_info *vulkan_info, const char *extension_type, bool is_debug_enabled)
static ULONG STDMETHODCALLTYPE d3d12_device_Release(ID3D12Device9 *iface)
static void * vkd3d_gpu_va_allocator_dereference_slab(struct vkd3d_gpu_va_allocator *allocator, D3D12_GPU_VIRTUAL_ADDRESS address)
static void d3d12_device_get_resource_allocation_info(struct d3d12_device *device, D3D12_RESOURCE_ALLOCATION_INFO1 *infos1, unsigned int count, const D3D12_RESOURCE_DESC *resource_descs, D3D12_RESOURCE_ALLOCATION_INFO *result)
static HRESULT STDMETHODCALLTYPE d3d12_cache_session_FindValue(ID3D12ShaderCacheSession *iface, const void *key, UINT key_size, void *value, UINT *value_size)
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateCommandList(ID3D12Device9 *iface, UINT node_mask, D3D12_COMMAND_LIST_TYPE type, ID3D12CommandAllocator *command_allocator, ID3D12PipelineState *initial_pipeline_state, REFIID riid, void **command_list)
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateReservedResource1(ID3D12Device9 *iface, const D3D12_RESOURCE_DESC *desc, D3D12_RESOURCE_STATES initial_state, const D3D12_CLEAR_VALUE *optimized_clear_value, ID3D12ProtectedResourceSession *protected_session, REFIID iid, void **resource)
void * vkd3d_gpu_va_allocator_dereference(struct vkd3d_gpu_va_allocator *allocator, D3D12_GPU_VIRTUAL_ADDRESS address)
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateStateObject(ID3D12Device9 *iface, const D3D12_STATE_OBJECT_DESC *desc, REFIID iid, void **state_object)
VkInstance vkd3d_instance_get_vk_instance(struct vkd3d_instance *instance)
#define VKD3D_VA_SLAB_BASE
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateDescriptorHeap(ID3D12Device9 *iface, const D3D12_DESCRIPTOR_HEAP_DESC *desc, REFIID riid, void **descriptor_heap)
static bool d3d12_device_environment_is_vulkan_min_1_1(struct d3d12_device *device)
static HRESULT STDMETHODCALLTYPE d3d12_device_AddToStateObject(ID3D12Device9 *iface, const D3D12_STATE_OBJECT_DESC *addition, ID3D12StateObject *state_object_to_grow_from, REFIID riid, void **new_state_object)
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateCommittedResource1(ID3D12Device9 *iface, const D3D12_HEAP_PROPERTIES *heap_properties, D3D12_HEAP_FLAGS heap_flags, const D3D12_RESOURCE_DESC *desc, D3D12_RESOURCE_STATES initial_state, const D3D12_CLEAR_VALUE *optimized_clear_value, ID3D12ProtectedResourceSession *protected_session, REFIID iid, void **resource)
static HRESULT STDMETHODCALLTYPE d3d12_device_SetPrivateData(ID3D12Device9 *iface, REFGUID guid, UINT data_size, const void *data)
#define VKD3D_VA_SLAB_COUNT
static HRESULT STDMETHODCALLTYPE d3d12_device_EnqueueMakeResident(ID3D12Device9 *iface, D3D12_RESIDENCY_FLAGS flags, UINT num_objects, ID3D12Pageable *const *objects, ID3D12Fence *fence, UINT64 fence_value)
static HRESULT STDMETHODCALLTYPE d3d12_device_SetResidencyPriority(ID3D12Device9 *iface, UINT object_count, ID3D12Pageable *const *objects, const D3D12_RESIDENCY_PRIORITY *priorities)
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateCommittedResource(ID3D12Device9 *iface, const D3D12_HEAP_PROPERTIES *heap_properties, D3D12_HEAP_FLAGS heap_flags, const D3D12_RESOURCE_DESC *desc, D3D12_RESOURCE_STATES initial_state, const D3D12_CLEAR_VALUE *optimized_clear_value, REFIID iid, void **resource)
static void device_init_descriptor_pool_sizes(struct d3d12_device *device)
ULONG vkd3d_instance_decref(struct vkd3d_instance *instance)
static UINT STDMETHODCALLTYPE d3d12_device_GetNodeCount(ID3D12Device9 *iface)
#define CHECK_MIN_REQUIREMENT(name, value)
#define VKD3D_MAX_UAV_CLEAR_DESCRIPTORS_PER_TYPE
static HRESULT STDMETHODCALLTYPE d3d12_device_CreatePipelineState(ID3D12Device9 *iface, const D3D12_PIPELINE_STATE_STREAM_DESC *desc, REFIID iid, void **pipeline_state)
struct vkd3d_instance * vkd3d_instance_from_device(ID3D12Device *device)
static D3D12_GPU_VIRTUAL_ADDRESS vkd3d_gpu_va_allocator_allocate_slab(struct vkd3d_gpu_va_allocator *allocator, uint64_t aligned_size, void *ptr)
static HRESULT d3d12_device_init_pipeline_cache(struct d3d12_device *device)
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateComputePipelineState(ID3D12Device9 *iface, const D3D12_COMPUTE_PIPELINE_STATE_DESC *desc, REFIID riid, void **pipeline_state)
static HRESULT STDMETHODCALLTYPE d3d12_cache_session_GetDevice(ID3D12ShaderCacheSession *iface, REFIID iid, void **device)
static void STDMETHODCALLTYPE d3d12_device_CreateSamplerFeedbackUnorderedAccessView(ID3D12Device9 *iface, ID3D12Resource *target_resource, ID3D12Resource *feedback_resource, D3D12_CPU_DESCRIPTOR_HANDLE descriptor)
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateFence(ID3D12Device9 *iface, UINT64 initial_value, D3D12_FENCE_FLAGS flags, REFIID riid, void **fence)
static void STDMETHODCALLTYPE d3d12_device_CopyDescriptors(ID3D12Device9 *iface, UINT dst_descriptor_range_count, const D3D12_CPU_DESCRIPTOR_HANDLE *dst_descriptor_range_offsets, const UINT *dst_descriptor_range_sizes, UINT src_descriptor_range_count, const D3D12_CPU_DESCRIPTOR_HANDLE *src_descriptor_range_offsets, const UINT *src_descriptor_range_sizes, D3D12_DESCRIPTOR_HEAP_TYPE descriptor_heap_type)
static HRESULT vkd3d_select_physical_device(struct vkd3d_instance *instance, unsigned int device_index, VkPhysicalDevice *selected_device)
static HRESULT STDMETHODCALLTYPE d3d12_device_OpenSharedHandle(ID3D12Device9 *iface, HANDLE handle, REFIID riid, void **object)
#define VKD3D_VA_SLAB_SIZE
static void STDMETHODCALLTYPE d3d12_device_CreateUnorderedAccessView(ID3D12Device9 *iface, ID3D12Resource *resource, ID3D12Resource *counter_resource, const D3D12_UNORDERED_ACCESS_VIEW_DESC *desc, D3D12_CPU_DESCRIPTOR_HANDLE descriptor)
static void vkd3d_chain_physical_device_info_structures(struct vkd3d_physical_device_info *info, struct d3d12_device *device)
static HRESULT STDMETHODCALLTYPE d3d12_device_CreatePipelineLibrary(ID3D12Device9 *iface, const void *blob, SIZE_T blob_size, REFIID iid, void **lib)
static void STDMETHODCALLTYPE d3d12_device_CreateConstantBufferView(ID3D12Device9 *iface, const D3D12_CONSTANT_BUFFER_VIEW_DESC *desc, D3D12_CPU_DESCRIPTOR_HANDLE descriptor)
static HRESULT STDMETHODCALLTYPE d3d12_device_OpenExistingHeapFromFileMapping(ID3D12Device9 *iface, HANDLE file_mapping, REFIID iid, void **heap)
static HRESULT d3d12_device_init(struct d3d12_device *device, struct vkd3d_instance *instance, const struct vkd3d_device_create_info *create_info)
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateCommandList1(ID3D12Device9 *iface, UINT node_mask, D3D12_COMMAND_LIST_TYPE type, D3D12_COMMAND_LIST_FLAGS flags, REFIID iid, void **command_list)
static bool d3d12_is_64k_msaa_supported(struct d3d12_device *device)
static D3D12_SHADER_CACHE_SESSION_DESC *STDMETHODCALLTYPE d3d12_cache_session_GetDesc(ID3D12ShaderCacheSession *iface, D3D12_SHADER_CACHE_SESSION_DESC *desc)
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateProtectedResourceSession1(ID3D12Device9 *iface, const D3D12_PROTECTED_RESOURCE_SESSION_DESC1 *desc, REFIID riid, void **session)
HRESULT d3d12_device_add_descriptor_heap(struct d3d12_device *device, struct d3d12_descriptor_heap *heap)
static void vkd3d_gpu_va_allocator_cleanup(struct vkd3d_gpu_va_allocator *allocator)
static struct d3d12_device * impl_from_ID3D12Device9(ID3D12Device9 *iface)
static void vkd3d_override_caps(struct d3d12_device *device)
static HRESULT STDMETHODCALLTYPE d3d12_cache_session_StoreValue(ID3D12ShaderCacheSession *iface, const void *key, UINT key_size, const void *value, UINT value_size)
static D3D12_RESOURCE_ALLOCATION_INFO *STDMETHODCALLTYPE d3d12_device_GetResourceAllocationInfo(ID3D12Device9 *iface, D3D12_RESOURCE_ALLOCATION_INFO *info, UINT visible_mask, UINT count, const D3D12_RESOURCE_DESC *resource_descs)
static HRESULT STDMETHODCALLTYPE d3d12_cache_session_QueryInterface(ID3D12ShaderCacheSession *iface, REFIID iid, void **object)
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateMetaCommand(ID3D12Device9 *iface, REFGUID command_id, UINT node_mask, const void *parameters_data, SIZE_T data_size_in_bytes, REFIID iid, void **meta_command)
D3D12_GPU_VIRTUAL_ADDRESS vkd3d_gpu_va_allocator_allocate(struct vkd3d_gpu_va_allocator *allocator, size_t alignment, uint64_t size, void *ptr)
static HRESULT vkd3d_create_vk_descriptor_heap_layout(struct d3d12_device *device, unsigned int index)
static HRESULT STDMETHODCALLTYPE d3d12_device_GetDeviceRemovedReason(ID3D12Device9 *iface)
static void STDMETHODCALLTYPE d3d12_device_GetRaytracingAccelerationStructurePrebuildInfo(ID3D12Device9 *iface, const D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_INPUTS *desc, D3D12_RAYTRACING_ACCELERATION_STRUCTURE_PREBUILD_INFO *info)
static HRESULT vkd3d_init_instance_caps(struct vkd3d_instance *instance, const struct vkd3d_instance_create_info *create_info, uint32_t *instance_extension_count, bool **user_extension_supported)
static const struct vkd3d_optional_extension_info optional_instance_extensions[]
#define CHECK_MAX_REQUIREMENT(name, value)
static HRESULT STDMETHODCALLTYPE d3d12_device_MakeResident(ID3D12Device9 *iface, UINT object_count, ID3D12Pageable *const *objects)
VkDevice vkd3d_get_vk_device(ID3D12Device *device)
static ULONG STDMETHODCALLTYPE d3d12_cache_session_Release(ID3D12ShaderCacheSession *iface)
static void vkd3d_trace_physical_device(VkPhysicalDevice device, const struct vkd3d_physical_device_info *info, const struct vkd3d_vk_instance_procs *vk_procs)
static VkBool32 VKAPI_PTR vkd3d_debug_report_callback(VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT object_type, uint64_t object, size_t location, int32_t message_code, const char *layer_prefix, const char *message, void *user_data)
static int vkd3d_gpu_va_allocation_compare(const void *k, const void *e)
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateCommandQueue1(ID3D12Device9 *iface, const D3D12_COMMAND_QUEUE_DESC *desc, REFIID creator_id, REFIID iid, void **command_queue)
static void vkd3d_trace_physical_device_limits(const struct vkd3d_physical_device_info *info)
static const void * vkd3d_find_struct_(const struct vkd3d_struct *chain, enum vkd3d_structure_type type)
struct d3d12_device * unsafe_impl_from_ID3D12Device9(ID3D12Device9 *iface)
static HRESULT vkd3d_create_vk_device(struct d3d12_device *device, const struct vkd3d_device_create_info *create_info)
static void vkd3d_init_debug_report(struct vkd3d_instance *instance)
static void vkd3d_gpu_va_allocator_free_slab(struct vkd3d_gpu_va_allocator *allocator, D3D12_GPU_VIRTUAL_ADDRESS address)
static ULONG STDMETHODCALLTYPE d3d12_device_AddRef(ID3D12Device9 *iface)
static HRESULT STDMETHODCALLTYPE d3d12_cache_session_SetName(ID3D12ShaderCacheSession *iface, const WCHAR *name)
static void vkd3d_restrict_format_support_for_feature_level(D3D12_FEATURE_DATA_FORMAT_SUPPORT *format_support)
static void d3d12_device_get_copyable_footprints(struct d3d12_device *device, const D3D12_RESOURCE_DESC1 *desc, unsigned int first_sub_resource, unsigned int sub_resource_count, uint64_t base_offset, D3D12_PLACED_SUBRESOURCE_FOOTPRINT *layouts, UINT *row_counts, UINT64 *row_sizes, UINT64 *total_bytes)
static HRESULT vkd3d_select_queues(const struct vkd3d_instance *vkd3d_instance, VkPhysicalDevice physical_device, struct vkd3d_device_queue_info *info)
static HRESULT STDMETHODCALLTYPE d3d12_device_EnumerateMetaCommandParameters(ID3D12Device9 *iface, REFGUID command_id, D3D12_META_COMMAND_PARAMETER_STAGE stage, UINT *size_in_bytes, UINT *parameter_count, D3D12_META_COMMAND_PARAMETER_DESC *parameter_desc)
static void STDMETHODCALLTYPE d3d12_device_CreateDepthStencilView(ID3D12Device9 *iface, ID3D12Resource *resource, const D3D12_DEPTH_STENCIL_VIEW_DESC *desc, D3D12_CPU_DESCRIPTOR_HANDLE descriptor)
static unsigned int get_spec_version(const VkExtensionProperties *extensions, unsigned int count, const char *extension_name)
static void STDMETHODCALLTYPE d3d12_device_GetCopyableFootprints(ID3D12Device9 *iface, const D3D12_RESOURCE_DESC *desc, UINT first_sub_resource, UINT sub_resource_count, UINT64 base_offset, D3D12_PLACED_SUBRESOURCE_FOOTPRINT *layouts, UINT *row_counts, UINT64 *row_sizes, UINT64 *total_bytes)
static bool is_extension_disabled(const char *extension_name)
static void vkd3d_physical_device_info_init(struct vkd3d_physical_device_info *info, struct d3d12_device *device)
static HRESULT STDMETHODCALLTYPE d3d12_device_ShaderCacheControl(ID3D12Device9 *iface, D3D12_SHADER_CACHE_KIND_FLAGS kinds, D3D12_SHADER_CACHE_CONTROL_FLAGS control)
HRESULT vkd3d_create_instance(const struct vkd3d_instance_create_info *create_info, struct vkd3d_instance **instance)
HRESULT vkd3d_join_thread(struct vkd3d_instance *instance, union vkd3d_thread_handle *thread)
static void STDMETHODCALLTYPE d3d12_device_CopyDescriptorsSimple(ID3D12Device9 *iface, UINT descriptor_count, const D3D12_CPU_DESCRIPTOR_HANDLE dst_descriptor_range_offset, const D3D12_CPU_DESCRIPTOR_HANDLE src_descriptor_range_offset, D3D12_DESCRIPTOR_HEAP_TYPE descriptor_heap_type)
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateCommandQueue(ID3D12Device9 *iface, const D3D12_COMMAND_QUEUE_DESC *desc, REFIID riid, void **command_queue)
static void STDMETHODCALLTYPE d3d12_cache_session_SetDeleteOnDestroy(ID3D12ShaderCacheSession *iface)
static struct list cache_list
static bool d3d12_device_supports_typed_uav_load_additional_formats(const struct d3d12_device *device)
static uint64_t vkd3d_init_config_flags(void)
static void vkd3d_trace_physical_device_features(const struct vkd3d_physical_device_info *info)
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateLifetimeTracker(ID3D12Device9 *iface, ID3D12LifetimeOwner *owner, REFIID iid, void **tracker)
static bool have_vk_time_domain(VkTimeDomainEXT *domains, unsigned int count, VkTimeDomainEXT domain)
static void d3d12_device_destroy_pipeline_cache(struct d3d12_device *device)
static float queue_priorities[]
static void vkd3d_desc_object_cache_cleanup(struct vkd3d_desc_object_cache *cache)
static const struct vkd3d_optional_extension_info optional_device_extensions[]
static void vkd3d_time_domains_init(struct d3d12_device *device)
static const struct ID3D12Device9Vtbl d3d12_device_vtbl
#define VKD3D_VA_SLAB_SIZE_SHIFT
bool d3d12_device_is_uma(struct d3d12_device *device, bool *coherent)
static HRESULT STDMETHODCALLTYPE d3d12_cache_session_GetPrivateData(ID3D12ShaderCacheSession *iface, REFGUID guid, UINT *data_size, void *data)
static LUID *STDMETHODCALLTYPE d3d12_device_GetAdapterLuid(ID3D12Device9 *iface, LUID *luid)
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateRootSignature(ID3D12Device9 *iface, UINT node_mask, const void *bytecode, SIZE_T bytecode_length, REFIID riid, void **root_signature)
ULONG vkd3d_instance_incref(struct vkd3d_instance *instance)
static HRESULT STDMETHODCALLTYPE d3d12_device_OpenSharedHandleByName(ID3D12Device9 *iface, const WCHAR *name, DWORD access, HANDLE *handle)
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateCommittedResource2(ID3D12Device9 *iface, const D3D12_HEAP_PROPERTIES *heap_properties, D3D12_HEAP_FLAGS heap_flags, const D3D12_RESOURCE_DESC1 *desc, D3D12_RESOURCE_STATES initial_state, const D3D12_CLEAR_VALUE *optimized_clear_value, ID3D12ProtectedResourceSession *protected_session, REFIID iid, void **resource)
static HRESULT STDMETHODCALLTYPE d3d12_device_SetPrivateDataInterface(ID3D12Device9 *iface, REFGUID guid, const IUnknown *data)
static unsigned int vkd3d_enable_extensions(const char *extensions[], const char *const *required_extensions, unsigned int required_extension_count, const struct vkd3d_optional_extension_info *optional_extensions, unsigned int optional_extension_count, const char *const *user_extensions, unsigned int user_extension_count, const char *const *optional_user_extensions, unsigned int optional_user_extension_count, bool *user_extension_supported, const struct vkd3d_vulkan_info *vulkan_info)
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateCommandSignature(ID3D12Device9 *iface, const D3D12_COMMAND_SIGNATURE_DESC *desc, ID3D12RootSignature *root_signature, REFIID iid, void **command_signature)
static void vkd3d_device_descriptor_limits_init(struct vkd3d_device_descriptor_limits *limits, const VkPhysicalDeviceLimits *device_limits)
static void STDMETHODCALLTYPE d3d12_device_CreateSampler(ID3D12Device9 *iface, const D3D12_SAMPLER_DESC *desc, D3D12_CPU_DESCRIPTOR_HANDLE descriptor)
static void d3d12_device_get_resource1_allocation_info(struct d3d12_device *device, D3D12_RESOURCE_ALLOCATION_INFO1 *infos1, unsigned int count, const D3D12_RESOURCE_DESC1 *resource_descs, D3D12_RESOURCE_ALLOCATION_INFO *result)
HRESULT vkd3d_create_thread(struct vkd3d_instance *instance, PFN_vkd3d_thread thread_main, void *data, union vkd3d_thread_handle *thread)
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateShaderCacheSession(ID3D12Device9 *iface, const D3D12_SHADER_CACHE_SESSION_DESC *desc, REFIID iid, void **session)
static HRESULT d3d12_cache_session_init(struct d3d12_cache_session *session, struct d3d12_device *device, const D3D12_SHADER_CACHE_SESSION_DESC *desc)
static void vkd3d_gpu_va_allocator_free_fallback(struct vkd3d_gpu_va_allocator *allocator, D3D12_GPU_VIRTUAL_ADDRESS address)
static HRESULT STDMETHODCALLTYPE d3d12_device_GetPrivateData(ID3D12Device9 *iface, REFGUID guid, UINT *data_size, void *data)
void d3d12_device_remove_descriptor_heap(struct d3d12_device *device, struct d3d12_descriptor_heap *heap)
static void STDMETHODCALLTYPE d3d12_device_GetResourceTiling(ID3D12Device9 *iface, ID3D12Resource *resource, UINT *total_tile_count, D3D12_PACKED_MIP_INFO *packed_mip_info, D3D12_TILE_SHAPE *standard_tile_shape, UINT *sub_resource_tiling_count, UINT first_sub_resource_tiling, D3D12_SUBRESOURCE_TILING *sub_resource_tilings)
static HRESULT vkd3d_init_device_caps(struct d3d12_device *device, const struct vkd3d_device_create_info *create_info, struct vkd3d_physical_device_info *physical_device_info, uint32_t *device_extension_count, bool **user_extension_supported)
static HRESULT STDMETHODCALLTYPE d3d12_cache_session_SetPrivateDataInterface(ID3D12ShaderCacheSession *iface, REFGUID guid, const IUnknown *data)
static HRESULT d3d12_device_create_vkd3d_queues(struct d3d12_device *device, const struct vkd3d_device_queue_info *queue_info)
#define VK_EXTENSION(name, member)
static void STDMETHODCALLTYPE d3d12_device_RemoveDevice(ID3D12Device9 *iface)
IUnknown * vkd3d_get_device_parent(ID3D12Device *device)
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateSharedHandle(ID3D12Device9 *iface, ID3D12DeviceChild *object, const SECURITY_ATTRIBUTES *attributes, DWORD access, const WCHAR *name, HANDLE *handle)
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateReservedResource(ID3D12Device9 *iface, const D3D12_RESOURCE_DESC *desc, D3D12_RESOURCE_STATES initial_state, const D3D12_CLEAR_VALUE *optimized_clear_value, REFIID iid, void **resource)
static D3D12_RESOURCE_ALLOCATION_INFO *STDMETHODCALLTYPE d3d12_device_GetResourceAllocationInfo2(ID3D12Device9 *iface, D3D12_RESOURCE_ALLOCATION_INFO *info, UINT visible_mask, UINT count, const D3D12_RESOURCE_DESC1 *resource_descs, D3D12_RESOURCE_ALLOCATION_INFO1 *info1)
static HRESULT STDMETHODCALLTYPE d3d12_device_EnumerateMetaCommands(ID3D12Device9 *iface, UINT *num_meta_commands, D3D12_META_COMMAND_DESC *command_desc)
static HRESULT STDMETHODCALLTYPE d3d12_device_QueryInterface(ID3D12Device9 *iface, REFIID riid, void **object)
static HRESULT STDMETHODCALLTYPE d3d12_device_OpenExistingHeapFromAddress(ID3D12Device9 *iface, const void *address, REFIID iid, void **heap)
#define VKD3D_DEFAULT_HOST_TICKS_PER_SECOND
static bool vkd3d_gpu_va_allocator_init(struct vkd3d_gpu_va_allocator *allocator)
HRESULT d3d12_device_create(struct vkd3d_instance *instance, const struct vkd3d_device_create_info *create_info, struct d3d12_device **device)
static HRESULT STDMETHODCALLTYPE d3d12_device_CreatePlacedResource(ID3D12Device9 *iface, ID3D12Heap *heap, UINT64 heap_offset, const D3D12_RESOURCE_DESC *desc, D3D12_RESOURCE_STATES initial_state, const D3D12_CLEAR_VALUE *optimized_clear_value, REFIID iid, void **resource)
#define VK_DEBUG_EXTENSION(name, member)
static void vkd3d_device_vk_heaps_descriptor_limits_init(struct vkd3d_device_descriptor_limits *limits, const VkPhysicalDeviceDescriptorIndexingPropertiesEXT *properties)
static HRESULT STDMETHODCALLTYPE d3d12_device_CreatePlacedResource1(ID3D12Device9 *iface, ID3D12Heap *heap, UINT64 heap_offset, const D3D12_RESOURCE_DESC1 *resource_desc, D3D12_RESOURCE_STATES initial_state, const D3D12_CLEAR_VALUE *optimized_clear_value, REFIID iid, void **resource)
void d3d12_desc_create_cbv(struct d3d12_desc *descriptor, struct d3d12_device *device, const D3D12_CONSTANT_BUFFER_VIEW_DESC *desc)
void d3d12_dsv_desc_create_dsv(struct d3d12_dsv_desc *dsv_desc, struct d3d12_device *device, struct d3d12_resource *resource, const D3D12_DEPTH_STENCIL_VIEW_DESC *desc)
HRESULT d3d12_reserved_resource_create(struct d3d12_device *device, const D3D12_RESOURCE_DESC1 *desc, D3D12_RESOURCE_STATES initial_state, const D3D12_CLEAR_VALUE *optimized_clear_value, struct d3d12_resource **resource)
void d3d12_rtv_desc_create_rtv(struct d3d12_rtv_desc *rtv_desc, struct d3d12_device *device, struct d3d12_resource *resource, const D3D12_RENDER_TARGET_VIEW_DESC *desc)
void d3d12_desc_copy(struct d3d12_desc *dst, const struct d3d12_desc *src, struct d3d12_descriptor_heap *dst_heap, struct d3d12_device *device)
HRESULT d3d12_heap_create(struct d3d12_device *device, const D3D12_HEAP_DESC *desc, const struct d3d12_resource *resource, ID3D12ProtectedResourceSession *protected_session, struct d3d12_heap **heap)
void d3d12_desc_flush_vk_heap_updates_locked(struct d3d12_descriptor_heap *descriptor_heap, struct d3d12_device *device)
HRESULT d3d12_resource_validate_desc(const D3D12_RESOURCE_DESC1 *desc, struct d3d12_device *device)
void vkd3d_destroy_null_resources(struct vkd3d_null_resources *null_resources, struct d3d12_device *device)
void d3d12_resource_get_tiling(struct d3d12_device *device, const struct d3d12_resource *resource, UINT *total_tile_count, D3D12_PACKED_MIP_INFO *packed_mip_info, D3D12_TILE_SHAPE *standard_tile_shape, UINT *subresource_tiling_count, UINT first_subresource_tiling, D3D12_SUBRESOURCE_TILING *subresource_tilings)
HRESULT vkd3d_get_image_allocation_info(struct d3d12_device *device, const D3D12_RESOURCE_DESC1 *desc, struct vkd3d_resource_allocation_info *allocation_info)
struct d3d12_heap * unsafe_impl_from_ID3D12Heap(ID3D12Heap *iface)
HRESULT d3d12_descriptor_heap_create(struct d3d12_device *device, const D3D12_DESCRIPTOR_HEAP_DESC *desc, struct d3d12_descriptor_heap **descriptor_heap)
HRESULT d3d12_committed_resource_create(struct d3d12_device *device, const D3D12_HEAP_PROPERTIES *heap_properties, D3D12_HEAP_FLAGS heap_flags, const D3D12_RESOURCE_DESC1 *desc, D3D12_RESOURCE_STATES initial_state, const D3D12_CLEAR_VALUE *optimized_clear_value, ID3D12ProtectedResourceSession *protected_session, struct d3d12_resource **resource)
void d3d12_desc_create_uav(struct d3d12_desc *descriptor, struct d3d12_device *device, struct d3d12_resource *resource, struct d3d12_resource *counter_resource, const D3D12_UNORDERED_ACCESS_VIEW_DESC *desc)
HRESULT d3d12_query_heap_create(struct d3d12_device *device, const D3D12_QUERY_HEAP_DESC *desc, struct d3d12_query_heap **heap)
void d3d12_desc_create_srv(struct d3d12_desc *descriptor, struct d3d12_device *device, struct d3d12_resource *resource, const D3D12_SHADER_RESOURCE_VIEW_DESC *desc)
struct d3d12_resource * unsafe_impl_from_ID3D12Resource(ID3D12Resource *iface)
void d3d12_desc_write_atomic(struct d3d12_desc *dst, const struct d3d12_desc *src, struct d3d12_device *device)
HRESULT vkd3d_init_null_resources(struct vkd3d_null_resources *null_resources, struct d3d12_device *device)
VkSampleCountFlagBits vk_samples_from_sample_count(unsigned int sample_count)
void d3d12_desc_create_sampler(struct d3d12_desc *sampler, struct d3d12_device *device, const D3D12_SAMPLER_DESC *desc)
HRESULT d3d12_placed_resource_create(struct d3d12_device *device, struct d3d12_heap *heap, uint64_t heap_offset, const D3D12_RESOURCE_DESC1 *desc, D3D12_RESOURCE_STATES initial_state, const D3D12_CLEAR_VALUE *optimized_clear_value, struct d3d12_resource **resource)
void vkd3d_render_pass_cache_init(struct vkd3d_render_pass_cache *cache)
HRESULT d3d12_root_signature_create(struct d3d12_device *device, const void *bytecode, size_t bytecode_length, struct d3d12_root_signature **root_signature)
HRESULT d3d12_pipeline_state_create_graphics(struct d3d12_device *device, const D3D12_GRAPHICS_PIPELINE_STATE_DESC *desc, struct d3d12_pipeline_state **state)
HRESULT vkd3d_uav_clear_state_init(struct vkd3d_uav_clear_state *state, struct d3d12_device *device)
void vkd3d_uav_clear_state_cleanup(struct vkd3d_uav_clear_state *state, struct d3d12_device *device)
HRESULT d3d12_pipeline_state_create_compute(struct d3d12_device *device, const D3D12_COMPUTE_PIPELINE_STATE_DESC *desc, struct d3d12_pipeline_state **state)
void vkd3d_render_pass_cache_cleanup(struct vkd3d_render_pass_cache *cache, struct d3d12_device *device)
HRESULT d3d12_pipeline_state_create(struct d3d12_device *device, const D3D12_PIPELINE_STATE_STREAM_DESC *desc, struct d3d12_pipeline_state **state)
const char * debug_vk_memory_heap_flags(VkMemoryHeapFlags flags)
HRESULT return_interface(void *iface, REFIID iface_iid, REFIID requested_iid, void **object)
HRESULT vkd3d_load_vk_device_procs(struct vkd3d_vk_device_procs *procs, const struct vkd3d_vk_instance_procs *parent_procs, VkDevice device)
const char * debug_vk_extent_3d(VkExtent3D extent)
HRESULT vkd3d_set_private_data(struct vkd3d_private_store *store, const GUID *tag, unsigned int data_size, const void *data)
const char * debug_vk_memory_property_flags(VkMemoryPropertyFlags flags)
HRESULT vkd3d_load_vk_instance_procs(struct vkd3d_vk_instance_procs *procs, const struct vkd3d_vk_global_procs *global_procs, VkInstance instance)
HRESULT vkd3d_set_private_data_interface(struct vkd3d_private_store *store, const GUID *tag, const IUnknown *object)
HRESULT vkd3d_load_vk_global_procs(struct vkd3d_vk_global_procs *procs, PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr)
bool vkd3d_get_program_name(char program_name[PATH_MAX])
HRESULT hresult_from_errno(int rc)
const struct vkd3d_format * vkd3d_get_format(const struct d3d12_device *device, DXGI_FORMAT dxgi_format, bool depth_stencil)
HRESULT vkd3d_init_format_info(struct d3d12_device *device)
const char * debug_vk_queue_flags(VkQueueFlags flags)
HRESULT vkd3d_set_vk_object_name(struct d3d12_device *device, uint64_t vk_object, VkDebugReportObjectTypeEXT vk_object_type, const WCHAR *name)
void vkd3d_cleanup_format_info(struct d3d12_device *device)
const char * debug_cpu_handle(D3D12_CPU_DESCRIPTOR_HANDLE handle)
HRESULT vkd3d_get_private_data(struct vkd3d_private_store *store, const GUID *tag, unsigned int *out_size, void *out)
D3D12_RESOURCE_BINDING_TIER ResourceBindingTier
D3D12_TILED_RESOURCES_TIER TiledResourcesTier
D3D12_CONSERVATIVE_RASTERIZATION_TIER ConservativeRasterizationTier
BOOL TypedUAVLoadAdditionalFormats
D3D12_CPU_PAGE_PROPERTY CPUPageProperty
D3D12_MEMORY_POOL MemoryPoolPreference
const char * pApplicationName
uint32_t applicationVersion
const VkDescriptorBindingFlags * pBindingFlags
const VkDescriptorSetLayoutBinding * pBindings
VkDescriptorSetLayoutCreateFlags flags
uint32_t queueFamilyIndex
VkDeviceQueueCreateFlags flags
const float * pQueuePriorities
const char *const * ppEnabledExtensionNames
uint32_t enabledExtensionCount
const VkApplicationInfo * pApplicationInfo
const char *const * ppEnabledLayerNames
uint32_t enabledLayerCount
VkInstanceCreateFlags flags
uint32_t mutableDescriptorTypeListCount
const VkMutableDescriptorTypeListEXT * pMutableDescriptorTypeLists
const VkDescriptorType * pDescriptorTypes
uint32_t descriptorTypeCount
VkBool32 conditionalRendering
VkBool32 descriptorBindingVariableDescriptorCount
VkBool32 descriptorBindingStorageImageUpdateAfterBind
VkBool32 shaderInputAttachmentArrayDynamicIndexing
VkBool32 shaderInputAttachmentArrayNonUniformIndexing
VkBool32 shaderUniformTexelBufferArrayDynamicIndexing
VkBool32 shaderStorageImageArrayNonUniformIndexing
VkBool32 runtimeDescriptorArray
VkBool32 shaderStorageTexelBufferArrayNonUniformIndexing
VkBool32 shaderUniformTexelBufferArrayNonUniformIndexing
VkBool32 descriptorBindingUniformBufferUpdateAfterBind
VkBool32 descriptorBindingPartiallyBound
VkBool32 descriptorBindingStorageTexelBufferUpdateAfterBind
VkBool32 descriptorBindingSampledImageUpdateAfterBind
VkBool32 descriptorBindingStorageBufferUpdateAfterBind
VkBool32 shaderStorageTexelBufferArrayDynamicIndexing
VkBool32 shaderUniformBufferArrayNonUniformIndexing
VkBool32 shaderStorageBufferArrayNonUniformIndexing
VkBool32 descriptorBindingUniformTexelBufferUpdateAfterBind
VkBool32 shaderSampledImageArrayNonUniformIndexing
VkBool32 descriptorBindingUpdateUnusedWhilePending
VkBool32 shaderSampledImageArrayNonUniformIndexingNative
uint32_t maxDescriptorSetUpdateAfterBindInputAttachments
uint32_t maxPerStageDescriptorUpdateAfterBindUniformBuffers
uint32_t maxPerStageDescriptorUpdateAfterBindSampledImages
uint32_t maxDescriptorSetUpdateAfterBindUniformBuffersDynamic
uint32_t maxPerStageDescriptorUpdateAfterBindStorageBuffers
VkBool32 robustBufferAccessUpdateAfterBind
uint32_t maxPerStageDescriptorUpdateAfterBindStorageImages
VkBool32 shaderStorageBufferArrayNonUniformIndexingNative
VkBool32 shaderUniformBufferArrayNonUniformIndexingNative
VkBool32 quadDivergentImplicitLod
VkBool32 shaderInputAttachmentArrayNonUniformIndexingNative
uint32_t maxDescriptorSetUpdateAfterBindStorageImages
uint32_t maxPerStageDescriptorUpdateAfterBindInputAttachments
uint32_t maxUpdateAfterBindDescriptorsInAllPools
uint32_t maxPerStageUpdateAfterBindResources
uint32_t maxDescriptorSetUpdateAfterBindUniformBuffers
uint32_t maxDescriptorSetUpdateAfterBindStorageBuffersDynamic
uint32_t maxDescriptorSetUpdateAfterBindSampledImages
uint32_t maxPerStageDescriptorUpdateAfterBindSamplers
uint32_t maxDescriptorSetUpdateAfterBindSamplers
VkBool32 shaderStorageImageArrayNonUniformIndexingNative
uint32_t maxDescriptorSetUpdateAfterBindStorageBuffers
VkPhysicalDeviceFeatures features
VkBool32 samplerAnisotropy
VkBool32 shaderStorageBufferArrayDynamicIndexing
VkBool32 shaderCullDistance
VkBool32 shaderClipDistance
VkBool32 vertexPipelineStoresAndAtomics
VkBool32 shaderResourceMinLod
VkBool32 sampleRateShading
VkBool32 sparseResidency2Samples
VkBool32 textureCompressionASTC_LDR
VkBool32 shaderStorageImageMultisample
VkBool32 variableMultisampleRate
VkBool32 sparseResidency16Samples
VkBool32 multiDrawIndirect
VkBool32 independentBlend
VkBool32 tessellationShader
VkBool32 shaderSampledImageArrayDynamicIndexing
VkBool32 shaderResourceResidency
VkBool32 sparseResidency4Samples
VkBool32 shaderStorageImageWriteWithoutFormat
VkBool32 robustBufferAccess
VkBool32 drawIndirectFirstInstance
VkBool32 shaderStorageImageArrayDynamicIndexing
VkBool32 sparseResidencyImage2D
VkBool32 fragmentStoresAndAtomics
VkBool32 textureCompressionBC
VkBool32 textureCompressionETC2
VkBool32 fullDrawIndexUint32
VkBool32 shaderStorageImageExtendedFormats
VkBool32 occlusionQueryPrecise
VkBool32 sparseResidencyImage3D
VkBool32 shaderTessellationAndGeometryPointSize
VkBool32 shaderStorageImageReadWithoutFormat
VkBool32 fillModeNonSolid
VkBool32 shaderUniformBufferArrayDynamicIndexing
VkBool32 shaderImageGatherExtended
VkBool32 inheritedQueries
VkBool32 pipelineStatisticsQuery
VkBool32 sparseResidencyAliased
VkBool32 sparseResidency8Samples
VkBool32 sparseResidencyBuffer
VkBool32 fragmentShaderPixelInterlock
VkBool32 fragmentShaderShadingRateInterlock
VkBool32 fragmentShaderSampleInterlock
uint32_t maxTessellationPatchSize
uint32_t maxFramebufferLayers
uint32_t maxUniformBufferRange
uint32_t discreteQueuePriorities
uint32_t maxViewportDimensions[2]
uint32_t maxDescriptorSetSamplers
VkSampleCountFlags sampledImageIntegerSampleCounts
uint32_t viewportSubPixelBits
uint32_t subTexelPrecisionBits
uint32_t maxFramebufferHeight
uint32_t subPixelInterpolationOffsetBits
uint32_t maxFragmentCombinedOutputResources
int32_t minTexelGatherOffset
VkSampleCountFlags sampledImageColorSampleCounts
uint32_t maxTessellationControlPerVertexInputComponents
uint32_t maxDescriptorSetStorageBuffers
VkBool32 timestampComputeAndGraphics
uint32_t maxCombinedClipAndCullDistances
uint32_t maxGeometryOutputVertices
uint32_t maxPushConstantsSize
uint32_t maxVertexOutputComponents
uint32_t maxDrawIndexedIndexValue
size_t minMemoryMapAlignment
uint32_t maxStorageBufferRange
uint32_t mipmapPrecisionBits
uint32_t maxImageDimension2D
uint32_t maxCullDistances
uint32_t maxVertexInputBindings
uint32_t maxVertexInputAttributeOffset
uint32_t maxClipDistances
uint32_t maxDescriptorSetUniformBuffersDynamic
uint32_t maxImageDimensionCube
uint32_t maxFragmentInputComponents
uint32_t maxImageDimension1D
float viewportBoundsRange[2]
VkBool32 standardSampleLocations
uint32_t maxSamplerAllocationCount
uint32_t maxPerStageDescriptorInputAttachments
uint32_t maxPerStageDescriptorStorageBuffers
uint32_t maxDescriptorSetStorageImages
uint32_t maxComputeWorkGroupSize[3]
uint32_t maxComputeWorkGroupInvocations
VkSampleCountFlags framebufferColorSampleCounts
uint32_t maxTexelGatherOffset
uint32_t maxImageDimension3D
uint32_t maxImageArrayLayers
uint32_t maxMemoryAllocationCount
uint32_t maxDescriptorSetStorageBuffersDynamic
uint32_t maxFramebufferWidth
uint32_t maxDescriptorSetInputAttachments
uint32_t maxTexelBufferElements
VkSampleCountFlags storageImageSampleCounts
uint32_t maxPerStageDescriptorStorageImages
uint32_t maxGeometryShaderInvocations
uint32_t maxBoundDescriptorSets
VkSampleCountFlags framebufferStencilSampleCounts
float maxSamplerAnisotropy
float lineWidthGranularity
uint32_t maxTessellationControlPerPatchOutputComponents
uint32_t maxTessellationEvaluationOutputComponents
uint32_t maxGeometryOutputComponents
float maxInterpolationOffset
uint32_t maxPerStageDescriptorSamplers
uint32_t maxTessellationControlTotalOutputComponents
uint32_t maxTessellationControlPerVertexOutputComponents
uint32_t maxPerStageDescriptorUniformBuffers
uint32_t maxTessellationEvaluationInputComponents
float pointSizeGranularity
uint32_t maxComputeWorkGroupCount[3]
uint32_t maxGeometryTotalOutputComponents
float minInterpolationOffset
uint32_t maxVertexInputBindingStride
VkSampleCountFlags sampledImageStencilSampleCounts
uint32_t maxDrawIndirectCount
uint32_t maxColorAttachments
uint32_t maxComputeSharedMemorySize
uint32_t maxFragmentOutputAttachments
VkSampleCountFlags sampledImageDepthSampleCounts
uint32_t maxPerStageDescriptorSampledImages
uint32_t maxDescriptorSetSampledImages
uint32_t maxDescriptorSetUniformBuffers
uint32_t maxGeometryInputComponents
VkSampleCountFlags framebufferNoAttachmentsSampleCounts
uint32_t maxPerStageResources
VkSampleCountFlags framebufferDepthSampleCounts
uint32_t subPixelPrecisionBits
uint32_t maxSampleMaskWords
uint32_t maxFragmentDualSrcAttachments
uint32_t maxTessellationGenerationLevel
uint32_t maxVertexInputAttributes
uint32_t maxPerSetDescriptors
VkMemoryType memoryTypes[VK_MAX_MEMORY_TYPES]
VkBool32 mutableDescriptorType
VkPhysicalDeviceType deviceType
char deviceName[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE]
VkBool32 robustBufferAccess2
VkBool32 shaderDemoteToHelperInvocation
VkSubgroupFeatureFlags supportedOperations
VkShaderStageFlags supportedStages
VkBool32 texelBufferAlignment
VkBool32 storageTexelBufferOffsetSingleTexelAlignment
VkBool32 uniformTexelBufferOffsetSingleTexelAlignment
VkBool32 timelineSemaphore
VkBool32 vertexAttributeInstanceRateZeroDivisor
VkBool32 vertexAttributeInstanceRateDivisor
uint32_t maxVertexAttribDivisor
VkPipelineCacheCreateFlags flags
const void * pInitialData
ID3D12ShaderCacheSession ID3D12ShaderCacheSession_iface
struct list cache_list_entry
struct vkd3d_shader_cache * cache
struct d3d12_device * device
struct vkd3d_private_store private_store
D3D12_SHADER_CACHE_SESSION_DESC desc
VkPhysicalDevice vk_physical_device
ID3D12Device9 ID3D12Device9_iface
struct vkd3d_instance * vkd3d_instance
D3D12_RESOURCE_STATES initial_state
enum vkd3d_api_version api_version
const char * application_name
uint32_t application_version
uint32_t device_extension_count
D3D_FEATURE_LEVEL minimum_feature_level
const char *const * device_extensions
VkPhysicalDevice vk_physical_device
unsigned int storage_image_max_descriptors
unsigned int uniform_buffer_max_descriptors
unsigned int storage_buffer_max_descriptors
unsigned int sampled_image_max_descriptors
unsigned int sampler_max_descriptors
unsigned int vk_family_count
VkQueueFamilyProperties vk_properties[VKD3D_QUEUE_FAMILY_COUNT]
VkDeviceQueueCreateInfo vk_queue_create_info[VKD3D_QUEUE_FAMILY_COUNT]
unsigned int family_index[VKD3D_QUEUE_FAMILY_COUNT]
D3D12_GPU_VIRTUAL_ADDRESS base
uint64_t ticks_per_second
const char *const * instance_extensions
uint32_t instance_extension_count
PFN_vkd3d_signal_event pfn_signal_event
PFN_vkGetInstanceProcAddr pfn_vkGetInstanceProcAddr
enum vkd3d_structure_type type
PFN_vkd3d_join_thread pfn_join_thread
PFN_vkd3d_create_thread pfn_create_thread
struct vkd3d_vk_instance_procs vk_procs
const char *const * extensions
const char * extension_name
ptrdiff_t vulkan_info_offset
const char *const * extensions
VkPhysicalDeviceFeatures2 features2
VkPhysicalDeviceRobustness2FeaturesEXT robustness2_features
VkPhysicalDeviceConditionalRenderingFeaturesEXT conditional_rendering_features
VkPhysicalDeviceDescriptorIndexingPropertiesEXT descriptor_indexing_properties
VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT fragment_shader_interlock_features
VkPhysicalDeviceTimelineSemaphoreFeaturesKHR timeline_semaphore_features
VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT texel_buffer_alignment_features
VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT texel_buffer_alignment_properties
VkPhysicalDeviceProperties2KHR properties2
VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT demote_features
VkPhysicalDeviceTransformFeedbackFeaturesEXT xfb_features
VkPhysicalDeviceMaintenance3Properties maintenance3_properties
VkPhysicalDeviceSubgroupProperties subgroup_properties
VkPhysicalDeviceDescriptorIndexingFeaturesEXT descriptor_indexing_features
VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT vertex_divisor_properties
VkPhysicalDeviceDepthClipEnableFeaturesEXT depth_clip_features
VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT vertex_divisor_features
VkPhysicalDeviceTransformFeedbackPropertiesEXT xfb_properties
VkPhysicalDevice4444FormatsFeaturesEXT formats4444_features
VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT mutable_features
enum vkd3d_structure_type type
PFN_vkEnumerateInstanceExtensionProperties vkEnumerateInstanceExtensionProperties
PFN_vkCreateInstance vkCreateInstance
PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr
bool EXT_shader_viewport_index_layer
VkPhysicalDeviceLimits device_limits
bool vertex_attrib_zero_divisor
bool EXT_shader_stencil_export
VkPhysicalDeviceSparseProperties sparse_properties
bool uav_read_without_format
bool EXT_transform_feedback
bool EXT_fragment_shader_interlock
D3D_FEATURE_LEVEL max_feature_level
bool EXT_texel_buffer_alignment
unsigned int shader_extension_count
bool EXT_vertex_attribute_divisor
bool KHR_get_physical_device_properties2
bool EXT_conditional_rendering
struct vkd3d_device_descriptor_limits descriptor_limits
VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT texel_buffer_alignment_properties
bool EXT_shader_demote_to_helper_invocation
bool rasterization_stream
bool tessellation_shaders
enum vkd3d_shader_spirv_extension shader_extensions[VKD3D_MAX_SHADER_EXTENSIONS]
bool transform_feedback_queries
bool EXT_mutable_descriptor_type
bool KHR_timeline_semaphore
unsigned int max_vertex_attrib_divisor
bool EXT_depth_clip_enable
bool EXT_descriptor_indexing
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
#define CONTAINING_RECORD(address, type, field)
void *(* PFN_vkd3d_thread)(void *data)
@ VKD3D_STRUCTURE_TYPE_INSTANCE_CREATE_INFO
static int vkd3d_dlclose(void *handle)
static const char * debugstr_hresult(HRESULT hr)
static bool vkd3d_bound_range(size_t start, size_t count, size_t limit)
static void vkd3d_cond_init(struct vkd3d_cond *cond)
static void * vkd3d_dlsym(void *handle, const char *symbol)
static void vkd3d_parse_version(const char *version, int *major, int *minor)
static void vkd3d_mutex_init(struct vkd3d_mutex *lock)
static void vkd3d_mutex_unlock(struct vkd3d_mutex *lock)
static const char * vkd3d_dlerror(void)
static void vkd3d_mutex_lock(struct vkd3d_mutex *lock)
void vkd3d_set_thread_name(const char *name)
uint64_t vkd3d_parse_debug_options(const char *string, const struct vkd3d_debug_option *options, unsigned int option_count)
static void vkd3d_mutex_destroy(struct vkd3d_mutex *lock)
static uint32_t vkd3d_atomic_decrement_u32(uint32_t volatile *x)
#define VKD3D_MUTEX_INITIALIZER
static void vkd3d_cond_destroy(struct vkd3d_cond *cond)
static void * vkd3d_dlopen(const char *name)
bool vkd3d_debug_list_has_member(const char *string, const char *member)
#define VKD3D_ASSERT(cond)
const char const char * vkd3d_dbg_vsprintf(const char *fmt, va_list args)
static uint32_t vkd3d_atomic_increment_u32(uint32_t volatile *x)
unsigned int vkd3d_env_var_as_uint(const char *name, unsigned int default_value)
static void vkd3d_cond_wait(struct vkd3d_cond *cond, struct vkd3d_mutex *lock)
static void vkd3d_cond_signal(struct vkd3d_cond *cond)
static void * vkd3d_calloc(size_t count, size_t size)
static void vkd3d_free(void *ptr)
static void * vkd3d_malloc(size_t size)
bool vkd3d_array_reserve(void **elements, size_t *capacity, size_t element_count, size_t element_size)
vkd3d_vk_descriptor_set_index
@ VKD3D_SET_INDEX_MUTABLE
@ VKD3D_SET_INDEX_STORAGE_IMAGE
@ VKD3D_SET_INDEX_UNIFORM_TEXEL_BUFFER
@ VKD3D_SET_INDEX_SAMPLED_IMAGE
@ VKD3D_SET_INDEX_UNIFORM_BUFFER
@ VKD3D_SET_INDEX_STORAGE_TEXEL_BUFFER
@ VKD3D_SET_INDEX_SAMPLER
@ VKD3D_SET_INDEX_UAV_COUNTER
static void vk_prepend_struct(void *header, void *structure)
static void vkd3d_private_store_destroy(struct vkd3d_private_store *store)
static struct d3d12_rtv_desc * d3d12_rtv_desc_from_cpu_handle(D3D12_CPU_DESCRIPTOR_HANDLE cpu_handle)
static ULONG d3d12_device_release(struct d3d12_device *device)
static void d3d12_resource_desc1_from_desc(D3D12_RESOURCE_DESC1 *desc1, const D3D12_RESOURCE_DESC *desc)
#define VKD3D_MAX_VIRTUAL_HEAP_DESCRIPTORS_PER_TYPE
static ULONG d3d12_device_add_ref(struct d3d12_device *device)
static unsigned int d3d12_resource_desc_get_sub_resource_count(const D3D12_RESOURCE_DESC1 *desc)
static HRESULT d3d12_device_query_interface(struct d3d12_device *device, REFIID iid, void **object)
static unsigned int d3d12_resource_desc_get_width(const D3D12_RESOURCE_DESC1 *desc, unsigned int miplevel_idx)
static void debug_ignored_node_mask(unsigned int mask)
static HRESULT vkd3d_private_store_init(struct vkd3d_private_store *store)
#define VKD3D_MAX_DESCRIPTOR_SET_SAMPLERS
static struct d3d12_desc * d3d12_desc_from_cpu_handle(D3D12_CPU_DESCRIPTOR_HANDLE cpu_handle)
static const struct vkd3d_format * vkd3d_format_from_d3d12_resource_desc(const struct d3d12_device *device, const D3D12_RESOURCE_DESC1 *desc, DXGI_FORMAT view_format)
static struct d3d12_resource * impl_from_ID3D12Resource(ID3D12Resource *iface)
static unsigned int d3d12_resource_desc_get_height(const D3D12_RESOURCE_DESC1 *desc, unsigned int miplevel_idx)
static unsigned int d3d12_resource_desc_get_depth(const D3D12_RESOURCE_DESC1 *desc, unsigned int miplevel_idx)
@ VKD3D_CONFIG_FLAG_VIRTUAL_HEAPS
@ VKD3D_CONFIG_FLAG_VULKAN_DEBUG
static struct d3d12_dsv_desc * d3d12_dsv_desc_from_cpu_handle(D3D12_CPU_DESCRIPTOR_HANDLE cpu_handle)
static struct d3d12_descriptor_heap * d3d12_desc_get_descriptor_heap(const struct d3d12_desc *descriptor)
@ VKD3D_SHADER_SPIRV_EXTENSION_EXT_DEMOTE_TO_HELPER_INVOCATION
@ VKD3D_SHADER_SPIRV_EXTENSION_EXT_FRAGMENT_SHADER_INTERLOCK
@ VKD3D_SHADER_SPIRV_EXTENSION_EXT_STENCIL_EXPORT
@ VKD3D_SHADER_SPIRV_EXTENSION_EXT_VIEWPORT_INDEX_LAYER
@ VKD3D_SHADER_SPIRV_EXTENSION_EXT_DESCRIPTOR_INDEXING
@ VKD3D_SHADER_SPIRV_ENVIRONMENT_VULKAN_1_0
@ VKD3D_SHADER_SPIRV_ENVIRONMENT_VULKAN_1_1
void VKAPI_CALL vkGetPhysicalDeviceMemoryProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties *pMemoryProperties)
@ VK_DEBUG_REPORT_WARNING_BIT_EXT
@ VK_DEBUG_REPORT_ERROR_BIT_EXT
#define VK_API_VERSION_1_0
VkResult VKAPI_CALL vkEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char *pLayerName, uint32_t *pPropertyCount, VkExtensionProperties *pProperties)
VkResult VKAPI_CALL vkCreateDebugReportCallbackEXT(VkInstance instance, const VkDebugReportCallbackCreateInfoEXT *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDebugReportCallbackEXT *pCallback)
void VKAPI_CALL vkDestroyDevice(VkDevice device, const VkAllocationCallbacks *pAllocator)
void VKAPI_CALL vkGetPhysicalDeviceFeatures2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2 *pFeatures)
@ VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT
@ VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT
@ VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT
@ VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT
@ VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT
@ VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT
@ VK_FORMAT_FEATURE_BLIT_SRC_BIT
@ VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT
@ VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT
#define VK_VERSION_MAJOR(version)
@ VK_SHADER_STAGE_COMPUTE_BIT
@ VK_SHADER_STAGE_FRAGMENT_BIT
VkResult VKAPI_CALL vkCreateDescriptorSetLayout(VkDevice device, const VkDescriptorSetLayoutCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDescriptorSetLayout *pSetLayout)
@ VK_MEMORY_PROPERTY_HOST_COHERENT_BIT
@ VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT
#define VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME
VkFlags VkSubgroupFeatureFlags
void VKAPI_CALL vkGetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice, uint32_t *pQueueFamilyPropertyCount, VkQueueFamilyProperties *pQueueFamilyProperties)
void VKAPI_CALL vkGetPhysicalDeviceProperties2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2 *pProperties)
#define VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME
VkFlags VkImageUsageFlags
@ VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_EXT
@ VK_TIME_DOMAIN_DEVICE_EXT
@ VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_EXT
@ VK_TIME_DOMAIN_CLOCK_MONOTONIC_EXT
VkResult VKAPI_CALL vkGetPhysicalDeviceCalibrateableTimeDomainsEXT(VkPhysicalDevice physicalDevice, uint32_t *pTimeDomainCount, VkTimeDomainKHR *pTimeDomains)
#define VK_VERSION_PATCH(version)
void VKAPI_CALL vkGetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures *pFeatures)
VkResult(VKAPI_PTR * PFN_vkEnumerateInstanceVersion)(uint32_t *)
void VKAPI_CALL vkDestroyDescriptorSetLayout(VkDevice device, VkDescriptorSetLayout descriptorSetLayout, const VkAllocationCallbacks *pAllocator)
@ VK_IMAGE_TILING_OPTIMAL
PFN_vkVoidFunction(VKAPI_PTR * PFN_vkGetInstanceProcAddr)(VkInstance, const char *)
VkResult VKAPI_CALL vkCreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDevice *pDevice)
@ VK_SUBGROUP_FEATURE_SHUFFLE_BIT
@ VK_SUBGROUP_FEATURE_VOTE_BIT
@ VK_SUBGROUP_FEATURE_QUAD_BIT
@ VK_SUBGROUP_FEATURE_BASIC_BIT
@ VK_SUBGROUP_FEATURE_ARITHMETIC_BIT
@ VK_SUBGROUP_FEATURE_BALLOT_BIT
#define VK_VERSION_MINOR(version)
void VKAPI_CALL vkGetPhysicalDeviceFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties *pFormatProperties)
VkDebugReportObjectTypeEXT
@ VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT
@ VK_IMAGE_ASPECT_COLOR_BIT
@ VK_IMAGE_ASPECT_STENCIL_BIT
@ VK_IMAGE_ASPECT_DEPTH_BIT
@ VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
@ VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT
VkResult VKAPI_CALL vkGetPhysicalDeviceImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkImageFormatProperties *pImageFormatProperties)
@ VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT_EXT
@ VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT_EXT
@ VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT_EXT
@ VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT_EXT
PFN_vkVoidFunction VKAPI_CALL vkGetInstanceProcAddr(VkInstance instance, const char *pName)
VkResult VKAPI_CALL vkEnumerateInstanceVersion(uint32_t *pApiVersion)
#define VK_MAKE_VERSION(major, minor, patch)
void VKAPI_CALL vkDestroyDebugReportCallbackEXT(VkInstance instance, VkDebugReportCallbackEXT callback, const VkAllocationCallbacks *pAllocator)
#define VK_KHR_MAINTENANCE1_EXTENSION_NAME
@ VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU
@ VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU
@ VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT_EXT
void VKAPI_CALL vkDestroyInstance(VkInstance instance, const VkAllocationCallbacks *pAllocator)
@ VK_QUEUE_SPARSE_BINDING_BIT
@ VK_ERROR_FORMAT_NOT_SUPPORTED
@ VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER
@ VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE
@ VK_DESCRIPTOR_TYPE_SAMPLER
@ VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER
@ VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER
@ VK_DESCRIPTOR_TYPE_MUTABLE_EXT
@ VK_DESCRIPTOR_TYPE_STORAGE_IMAGE
VkResult VKAPI_CALL vkEnumeratePhysicalDevices(VkInstance instance, uint32_t *pPhysicalDeviceCount, VkPhysicalDevice *pPhysicalDevices)
VkFlags VkDebugReportFlagsEXT
void VKAPI_CALL vkGetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties *pProperties)
VkDescriptorBindingFlags VkDescriptorBindingFlagsEXT
void VKAPI_CALL vkDestroyPipelineCache(VkDevice device, VkPipelineCache pipelineCache, const VkAllocationCallbacks *pAllocator)
VkResult VKAPI_CALL vkCreatePipelineCache(VkDevice device, const VkPipelineCacheCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkPipelineCache *pPipelineCache)
#define VK_API_VERSION_1_1
@ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT
@ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT
@ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT
@ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT
@ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT
@ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_EXT
@ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2
@ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT
@ VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO_EXT
@ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT
@ VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO
@ VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO
@ VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT
@ VK_STRUCTURE_TYPE_APPLICATION_INFO
@ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES_EXT
@ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES_KHR
@ VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO
@ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES
@ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT
@ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2
@ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT
@ VK_STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_EXT
@ VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO
@ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES_EXT
@ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES
@ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES_EXT
@ VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO
@ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_INTERLOCK_FEATURES_EXT
@ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT
DWORD WINAPI GetLastError(void)
static size_t align(size_t addr, size_t alignment)
#define DXGI_ERROR_UNSUPPORTED
#define DXGI_ERROR_ALREADY_EXISTS