22#define VKD3D_NULL_BUFFER_SIZE 16
23#define VKD3D_NULL_VIEW_FORMAT DXGI_FORMAT_R8G8B8A8_UNORM
46 switch (heap_properties->
Type)
67 WARN(
"Invalid memory pool preference.\n");
85 WARN(
"Invalid CPU page property.\n");
91 WARN(
"Invalid heap type %#x.\n", heap_properties->
Type);
101 if (!(memory_type_mask & (1u <<
i)))
118 VkDeviceMemory *vk_memory,
uint32_t *vk_memory_type)
126 memory_requirements->size, memory_requirements->alignment);
129 allocate_info.
pNext = dedicated_allocate_info;
130 allocate_info.allocationSize = memory_requirements->size;
135 FIXME(
"Failed to find suitable memory type (allowed types %#x).\n", memory_requirements->
memoryTypeBits);
144 WARN(
"Failed to allocate device memory, vr %d.\n", vr);
169 memory_requirements = &memory_requirements2.memoryRequirements;
171 if (
device->vk_info.KHR_dedicated_allocation)
181 memory_requirements2.
pNext = &dedicated_requirements;
187 dedicated_allocation = &dedicated_info;
192 dedicated_info.buffer = vk_buffer;
201 memory_requirements, dedicated_allocation, vk_memory, vk_memory_type)))
206 WARN(
"Failed to bind memory, vr %d.\n", vr);
212 *vk_memory_size = memory_requirements->size;
231 memory_requirements = &memory_requirements2.memoryRequirements;
233 if (
device->vk_info.KHR_dedicated_allocation)
237 info.image = vk_image;
243 memory_requirements2.
pNext = &dedicated_requirements;
249 dedicated_allocation = &dedicated_info;
253 dedicated_info.image = vk_image;
263 memory_requirements, dedicated_allocation, vk_memory, vk_memory_type)))
268 WARN(
"Failed to bind memory, vr %d.\n", vr);
275 *vk_memory_size = memory_requirements->size;
287 REFIID iid,
void **
object)
297 ID3D12Heap_AddRef(iface);
336 if (
heap->is_private)
419 TRACE(
"iface %p, desc %p.\n", iface,
desc);
467 WARN(
"D3D12_HEAP_FLAG_ALLOW_DISPLAY is only for committed resources.\n");
476 return heap->device->memory_properties.memoryTypes[
heap->vk_memory_type].propertyFlags;
490 heap->resource_count = 0;
499 if (!
heap->desc.Properties.CreationNodeMask)
500 heap->desc.Properties.CreationNodeMask = 1;
501 if (!
heap->desc.Properties.VisibleNodeMask)
502 heap->desc.Properties.VisibleNodeMask = 1;
507 if (!
heap->desc.Alignment)
526 &
heap->desc.Properties,
heap->desc.Flags,
527 &
heap->vk_memory, &
heap->vk_memory_type, &vk_memory_size);
532 &
heap->desc.Properties,
heap->desc.Flags,
533 &
heap->vk_memory, &
heap->vk_memory_type, &vk_memory_size);
536 heap->desc.SizeInBytes = vk_memory_size;
540 memory_requirements.size =
heap->desc.SizeInBytes;
541 memory_requirements.alignment =
heap->desc.Alignment;
545 heap->desc.Flags, &memory_requirements,
NULL,
546 &
heap->vk_memory, &
heap->vk_memory_type);
556 if (!
heap->is_private)
559 heap->resource_count = 1;
567 ERR(
"Failed to map memory, vr %d.\n", vr);
583 if (protected_session)
584 FIXME(
"Protected session is not supported.\n");
595 TRACE(
"Created %s %p.\n",
object->is_private ?
"private heap" :
"heap",
object);
613 ERR(
"Invalid resource dimension %#x.\n", dimension);
620 switch (sample_count)
648 FIXME(
"Unhandled sample count %u.\n",
desc->Count);
657 const bool sparse_resource = !heap_properties;
666 buffer_info.
flags = 0;
667 buffer_info.size =
desc->Width;
672 if (
device->vk_info.sparse_properties.residencyNonResidentStrict)
683 if (
device->vk_info.EXT_conditional_rendering)
693 buffer_info.
usage &= ~VK_BUFFER_USAGE_TRANSFER_DST_BIT;
705 WARN(
"D3D12_RESOURCE_FLAG_ALLOW_SIMULTANEOUS_ACCESS cannot be set for buffers.\n");
709 if (
device->queue_family_count > 1)
723 FIXME(
"Unsupported resource flags %#x.\n",
desc->Flags);
727 WARN(
"Failed to create Vulkan buffer, vr %d.\n", vr);
746 for (
i = 0;
i <
device->format_compatibility_list_count; ++
i)
749 return &
device->format_compatibility_lists[
i];
765 WARN(
"Failed to get device image format properties, vr %d.\n", vr);
782 const bool sparse_resource = !heap_properties;
795 WARN(
"Invalid DXGI format %#x.\n",
desc->Format);
801 image_info.
flags = 0;
819 image_info.
pNext = &format_list;
823 &&
desc->Width ==
desc->Height &&
desc->DepthOrArraySize >= 6
824 &&
desc->SampleDesc.Count == 1)
832 if (
device->vk_info.sparse_properties.residencyNonResidentStrict)
859 WARN(
"D3D12_TEXTURE_LAYOUT_64KB_UNDEFINED_SWIZZLE must be used for reserved texture.\n");
875 FIXME(
"Unsupported layout %#x.\n",
desc->Layout);
891 TRACE(
"Creating image with VK_SHARING_MODE_CONCURRENT.\n");
910 WARN(
"Forcing VK_IMAGE_TILING_LINEAR for CPU readable texture.\n");
930 FIXME(
"Sparse images are not supported with format %u, type %u, samples %u, usage %#x.\n",
937 WARN(
"Failed to create Vulkan image, vr %d.\n", vr);
956 if (!
desc->MipLevels)
958 validated_desc = *
desc;
960 desc = &validated_desc;
972 allocation_info->
alignment = requirements.alignment;
1008 TRACE(
"%p increasing refcount to %u.\n",
resource, refcount);
1017 TRACE(
"%p decreasing refcount to %u.\n",
resource, refcount);
1037 unsigned int mip_level = sub_resource_idx %
resource->desc.MipLevels;
1054 && !(
box->left & width_mask)
1055 && !(
box->right & width_mask)
1056 && !(
box->top & height_mask)
1057 && !(
box->bottom & height_mask);
1087 UINT *subresource_tiling_count,
UINT first_subresource_tiling,
1090 unsigned int i, subresource, subresource_count, miplevel_idx,
count;
1094 tile_extent = &
resource->tiles.tile_extent;
1096 if (packed_mip_info)
1102 ?
resource->tiles.subresources[
resource->tiles.standard_mip_count].offset : 0;
1105 if (standard_tile_shape)
1113 if (total_tile_count)
1114 *total_tile_count =
resource->tiles.total_count;
1116 if (!subresource_tiling_count)
1119 subresource_count =
resource->tiles.subresource_count;
1121 count = subresource_count -
min(first_subresource_tiling, subresource_count);
1126 subresource =
i + first_subresource_tiling;
1127 miplevel_idx = subresource %
resource->desc.MipLevels;
1128 if (miplevel_idx >=
resource->tiles.standard_mip_count)
1130 memset(&subresource_tilings[
i], 0,
sizeof(subresource_tilings[
i]));
1135 tile_info = &
resource->tiles.subresources[subresource];
1141 *subresource_tiling_count =
i;
1146 unsigned int i, start_idx, subresource_count, tile_count, miplevel_idx;
1159 ERR(
"Failed to allocate subresource info array.\n");
1169 FIXME(
"Vulkan device tile size is greater than the standard D3D12 tile size.\n");
1171 tile_info = &
resource->tiles.subresources[0];
1175 tile_info->
extent.height = 1;
1176 tile_info->
extent.depth = 1;
1180 resource->tiles.tile_extent.height = 1;
1181 resource->tiles.tile_extent.depth = 1;
1183 resource->tiles.subresource_count = 1;
1184 resource->tiles.standard_mip_count = 1;
1185 resource->tiles.packed_mip_tile_count = 0;
1191 FIXME(
"Vulkan device tile size is greater than the standard D3D12 tile size.\n");
1193 requirement_count = 0;
1195 if (!(sparse_requirements_array =
vkd3d_calloc(requirement_count,
sizeof(*sparse_requirements_array))))
1197 ERR(
"Failed to allocate sparse requirements array.\n");
1201 &requirement_count, sparse_requirements_array));
1203 for (
i = 0;
i < requirement_count; ++
i)
1205 if (sparse_requirements_array[
i].formatProperties.aspectMask &
resource->format->vk_aspect_mask)
1209 WARN(
"Ignoring properties for aspect mask %#x.\n",
1210 sparse_requirements_array[
i].formatProperties.aspectMask);
1214 sparse_requirements = sparse_requirements_array[
i];
1221 WARN(
"Failed to get sparse requirements.\n");
1226 resource->tiles.subresource_count = subresource_count;
1227 resource->tiles.standard_mip_count = sparse_requirements.imageMipTailSize
1230 ? sparse_requirements.imageMipTailSize / requirements.alignment : 0;
1232 for (
i = 0, start_idx = 0;
i < subresource_count; ++
i)
1234 miplevel_idx =
i %
resource->desc.MipLevels;
1237 tile_info = &
resource->tiles.subresources[
i];
1239 tile_info->
offset = start_idx;
1240 tile_info->
count = 0;
1242 if (miplevel_idx < resource->tiles.standard_mip_count)
1244 tile_count = tile_info->
extent.width * tile_info->
extent.height * tile_info->
extent.depth;
1245 start_idx += tile_count;
1246 tile_info->
count = tile_count;
1248 else if (miplevel_idx ==
resource->tiles.standard_mip_count)
1250 tile_info->
count = 1;
1254 resource->tiles.total_count = start_idx;
1274 ID3D12Resource2_AddRef(iface);
1393 vk_range->memory =
resource->heap->vk_memory;
1395 vk_range->size =
size;
1409 ERR(
"Failed to invalidate memory, vr %d.\n", vr);
1423 ERR(
"Failed to flush memory, vr %d.\n", vr);
1430 unsigned int sub_resource_count;
1432 TRACE(
"iface %p, sub_resource %u, read_range %p, data %p.\n",
1433 iface, sub_resource, read_range,
data);
1437 WARN(
"Resource is not CPU accessible.\n");
1442 if (sub_resource >= sub_resource_count)
1444 WARN(
"Sub-resource index %u is out of range (%u sub-resources).\n", sub_resource, sub_resource_count);
1451 FIXME(
"Not implemented for textures.\n");
1457 FIXME(
"Not implemented for this resource type.\n");
1464 TRACE(
"Returning pointer %p.\n", *
data);
1469 else if (read_range->
End > read_range->
Begin)
1479 unsigned int sub_resource_count;
1481 TRACE(
"iface %p, sub_resource %u, written_range %p.\n",
1482 iface, sub_resource, written_range);
1485 if (sub_resource >= sub_resource_count)
1487 WARN(
"Sub-resource index %u is out of range (%u sub-resources).\n", sub_resource, sub_resource_count);
1493 else if (written_range->
End > written_range->
Begin)
1502 TRACE(
"iface %p, resource_desc %p.\n", iface, resource_desc);
1505 return resource_desc;
1512 TRACE(
"iface %p.\n", iface);
1518 UINT dst_sub_resource,
const D3D12_BOX *dst_box,
const void *src_data,
1519 UINT src_row_pitch,
UINT src_slice_pitch)
1531 TRACE(
"iface %p, src_data %p, src_row_pitch %u, src_slice_pitch %u, "
1532 "dst_sub_resource %u, dst_box %s.\n",
1533 iface, src_data, src_row_pitch, src_slice_pitch, dst_sub_resource,
debug_d3d12_box(dst_box));
1537 WARN(
"Buffers are not supported.\n");
1547 FIXME(
"Not supported for format %#x.\n",
format->dxgi_format);
1574 FIXME_ONCE(
"Not implemented for this resource type.\n");
1579 FIXME_ONCE(
"Not implemented for image tiling other than VK_IMAGE_TILING_LINEAR.\n");
1585 vk_layout.offset, vk_layout.size, vk_layout.rowPitch, vk_layout.depthPitch);
1589 vk_layout.depthPitch, dst_box->
left, dst_box->
top, dst_box->
front);
1591 vk_layout.depthPitch, dst_box->
right, dst_box->
bottom - 1, dst_box->
back - 1) - dst_offset;
1594 dst_data + dst_offset, vk_layout.rowPitch, vk_layout.depthPitch, dst_box->
right - dst_box->
left,
1603 void *dst_data,
UINT dst_row_pitch,
UINT dst_slice_pitch,
1616 TRACE(
"iface %p, dst_data %p, dst_row_pitch %u, dst_slice_pitch %u, "
1617 "src_sub_resource %u, src_box %s.\n",
1618 iface, dst_data, dst_row_pitch, dst_slice_pitch, src_sub_resource,
debug_d3d12_box(src_box));
1622 WARN(
"Buffers are not supported.\n");
1632 FIXME(
"Not supported for format %#x.\n",
format->dxgi_format);
1659 FIXME_ONCE(
"Not implemented for this resource type.\n");
1664 FIXME_ONCE(
"Not implemented for image tiling other than VK_IMAGE_TILING_LINEAR.\n");
1670 vk_layout.offset, vk_layout.size, vk_layout.rowPitch, vk_layout.depthPitch);
1674 vk_layout.depthPitch, src_box->
left, src_box->
top, src_box->
front);
1676 vk_layout.depthPitch, src_box->
right, src_box->
bottom - 1, src_box->
back - 1) - src_offset;
1681 dst_data, dst_row_pitch, dst_slice_pitch, src_box->
right - src_box->
left,
1693 TRACE(
"iface %p, heap_properties %p, flags %p.\n",
1694 iface, heap_properties,
flags);
1698 if (heap_properties)
1700 memset(heap_properties, 0,
sizeof(*heap_properties));
1712 WARN(
"Cannot get heap properties for reserved resources.\n");
1716 if (heap_properties)
1717 *heap_properties =
heap->desc.Properties;
1737 TRACE(
"iface %p, resource_desc %p.\n", iface, resource_desc);
1740 return resource_desc;
1789 FIXME(
"Unknown resource flags %#x.\n", unknown_flags);
1791 FIXME(
"Ignoring D3D12_RESOURCE_FLAG_ALLOW_CROSS_ADAPTER.\n");
1799 WARN(
"DXGI_FORMAT_UNKNOWN is invalid for textures.\n");
1808 WARN(
"1D texture with a format block height > 1.\n");
1820 if (!
desc->Alignment)
1827 WARN(
"Invalid resource alignment %#"PRIx64".\n",
desc->Alignment);
1838 WARN(
"Invalid resource alignment %#"PRIx64" (required %#x).\n",
1855 switch (
desc->Dimension)
1858 if (
desc->MipLevels != 1)
1860 WARN(
"Invalid miplevel count %u for buffer.\n",
desc->MipLevels);
1865 ||
desc->Height != 1 ||
desc->DepthOrArraySize != 1
1866 ||
desc->SampleDesc.Count != 1 ||
desc->SampleDesc.Quality != 0
1869 WARN(
"Invalid parameters for a buffer resource.\n");
1875 if (
desc->Height != 1)
1877 WARN(
"1D texture with a height of %u.\n",
desc->Height);
1883 if (!
desc->SampleDesc.Count)
1885 WARN(
"Invalid sample count 0.\n");
1888 if (
desc->SampleDesc.Count > 1
1891 WARN(
"Sample count %u invalid without ALLOW_RENDER_TARGET or ALLOW_DEPTH_STENCIL.\n",
1892 desc->SampleDesc.Count);
1898 WARN(
"Invalid format %#x.\n",
desc->Format);
1906 WARN(
"The device does not support tiled 3D images.\n");
1909 if (
format->plane_count > 1)
1911 WARN(
"Invalid format %#x. D3D12 does not support multiplanar formats for tiled resources.\n",
1923 WARN(
"Invalid resource dimension %#x.\n",
desc->Dimension);
1931 FIXME(
"Unhandled sampler feedback mip region size (%u, %u, %u).\n", mip_region->
Width, mip_region->
Height,
1946 WARN(
"Textures cannot be created on upload/readback heaps.\n");
1952 WARN(
"Render target and unordered access buffers cannot be created on upload/readback heaps.\n");
1959 WARN(
"For D3D12_HEAP_TYPE_UPLOAD the state must be D3D12_RESOURCE_STATE_GENERIC_READ.\n");
1964 WARN(
"For D3D12_HEAP_TYPE_READBACK the state must be D3D12_RESOURCE_STATE_COPY_DEST.\n");
1984 if (!heap_properties && !
device->vk_info.sparse_binding)
1986 WARN(
"The device does not support tiled images.\n");
1995 WARN(
"Invalid initial resource state %#x.\n", initial_state);
2000 WARN(
"Invalid initial resource state %#x for non-render-target.\n", initial_state);
2006 WARN(
"Optimized clear value must be NULL for buffers.\n");
2010 if (optimized_clear_value)
2011 WARN(
"Ignoring optimized clear value.\n");
2021 switch (
desc->Dimension)
2031 ERR(
"Failed to allocate GPU VA.\n");
2049 WARN(
"Invalid resource dimension %#x.\n",
resource->desc.Dimension);
2055 resource->initial_state = initial_state;
2106 heap_desc.
Flags = heap_flags;
2121 if (!heap_properties)
2123 WARN(
"Heap properties are NULL.\n");
2127 if (protected_session)
2128 FIXME(
"Protected session is not supported.\n");
2140 TRACE(
"Created committed resource %p.\n",
object);
2151 VkDevice vk_device =
device->vk_device;
2163 heap_offset =
align(heap_offset, requirements.alignment);
2166 if (heap_offset >
heap->desc.SizeInBytes || requirements.size >
heap->desc.SizeInBytes - heap_offset)
2168 WARN(
"Heap too small for the resource (offset %"PRIu64", resource size %"PRIu64", heap size %"PRIu64".\n",
2169 heap_offset, requirements.size,
heap->desc.SizeInBytes);
2173 if (heap_offset % requirements.alignment)
2176 heap_offset, requirements.alignment);
2177 goto allocate_memory;
2182 FIXME(
"Memory type %u cannot be bound to resource %p (allowed types %#x).\n",
2184 goto allocate_memory;
2201 resource->heap_offset = heap_offset;
2206 WARN(
"Failed to bind memory, vr %d.\n", vr);
2212 FIXME(
"Allocating device memory.\n");
2233 TRACE(
"Created placed resource %p.\n",
object);
2257 TRACE(
"Created reserved resource %p.\n",
object);
2277 WARN(
"Invalid structure type %#x.\n", create_info->
type);
2280 if (create_info->
next)
2281 WARN(
"Unhandled next %p.\n", create_info->
next);
2286 memset(
object, 0,
sizeof(*
object));
2289 object->refcount = 1;
2290 object->internal_refcount = 1;
2293 object->u.vk_image = create_info->
vk_image;
2310 TRACE(
"Created resource %p.\n",
object);
2329#define HEAD_INDEX_MASK (ARRAY_SIZE(cache->heads) - 1)
2337 union d3d12_desc_object
u;
2347 if ((
u.object =
cache->heads[
i].head))
2350 cache->heads[
i].head =
u.header->next;
2367 union d3d12_desc_object
u = {
object};
2382 u.header->next =
head;
2383 cache->heads[
i].head =
u.object;
2388#undef HEAD_INDEX_MASK
2399 desc->h.refcount = 1;
2413 ERR(
"Failed to allocate descriptor object.\n");
2417 view->h.magic = magic;
2418 view->h.vk_descriptor_type = vk_descriptor_type;
2419 view->h.refcount = 1;
2447 if (
view->v.vk_counter_view)
2455 union d3d12_desc_object
u = {
view};
2472#define VKD3D_DESCRIPTOR_WRITE_BUFFER_SIZE 24
2499 unsigned int i = writes->
count;
2557 union d3d12_desc_object
u = {
object};
2558 unsigned int i = writes->
count;
2562 type =
u.header->vk_descriptor_type;
2564 vk_procs = &
device->vk_procs;
2579 is_null = !
u.cb_desc->vk_cbv_info.buffer;
2596 is_null = !
u.view->v.u.vk_buffer_view;
2607 ERR(
"Unhandled descriptor type %#x.\n",
type);
2644 union d3d12_desc_object
u;
2645 unsigned int i,
next;
2657 descriptors = (
struct d3d12_desc *)descriptor_heap->descriptors;
2661 src = &descriptors[
i];
2684 unsigned int i,
head;
2703 void *
object =
src->s.u.object;
2745 alignment =
max(properties->storageTexelBufferOffsetAlignmentBytes,
2746 properties->uniformTexelBufferOffsetAlignmentBytes);
2758 return vk_info->
device_limits.minTexelBufferOffsetAlignment;
2772 WARN(
"Invalid format for buffer view %#x.\n",
format->dxgi_format);
2782 view_desc.
flags = 0;
2783 view_desc.buffer = vk_buffer;
2785 view_desc.offset =
offset;
2786 view_desc.range =
range;
2788 WARN(
"Failed to create Vulkan buffer view, vr %d.\n", vr);
2811 object->v.u.vk_buffer_view = vk_view;
2812 object->v.format =
format;
2813 object->v.info.buffer.offset =
offset;
2814 object->v.info.buffer.size =
size;
2819#define VKD3D_VIEW_RAW_BUFFER 0x1
2823 unsigned int offset,
unsigned int size,
unsigned int structure_stride,
2847 WARN(
"Failed to find format for %#x.\n",
resource->desc.Format);
2867 if (allowed_swizzle)
2876 FIXME(
"Stencil swizzle is not supported for format %#x.\n",
2883 if (allowed_swizzle)
2892 FIXME(
"Alpha swizzle is not supported.\n");
2899 if (allowed_swizzle)
2908 FIXME(
"B8G8R8X8 swizzle is not supported.\n");
2914 unsigned int component_index)
2917 = D3D12_DECODE_SHADER_4_COMPONENT_MAPPING(component_index, component_mapping);
2940 unsigned int component_mapping)
3001 if (view_format ==
resource->desc.Format)
3007 FIXME(
"Failed to find format (resource format %#x, view format %#x).\n",
3008 resource->desc.Format, view_format);
3012 desc->miplevel_idx = 0;
3013 desc->miplevel_count = 1;
3014 desc->layer_idx = 0;
3016 desc->vk_image_aspect =
desc->format->vk_aspect_mask;
3032 desc->layer_count = 1;
3036 FIXME(
"Resource dimension %#x not implemented.\n",
resource->desc.Dimension);
3044 desc->allowed_swizzle =
false;
3052 unsigned int max_layer_count;
3059 max_layer_count = 1;
3066 if (
desc->layer_idx >= max_layer_count)
3068 WARN(
"Layer index %u exceeds maximum available layer %u.\n",
desc->layer_idx, max_layer_count - 1);
3069 desc->layer_count = 1;
3073 max_layer_count -=
desc->layer_idx;
3074 if (
desc->layer_count <= max_layer_count)
3078 WARN(
"Layer count %u exceeds maximum %u.\n",
desc->layer_count, max_layer_count);
3079 desc->layer_count = max_layer_count;
3097 view_desc.
flags = 0;
3098 view_desc.image = vk_image;
3102 if (
desc->allowed_swizzle)
3109 if (
device->vk_info.KHR_maintenance2)
3114 view_desc.
pNext = &usage_desc;
3118 WARN(
"Failed to create Vulkan image view, vr %d.\n", vr);
3130 object->v.u.vk_image_view = vk_view;
3131 object->v.format =
format;
3132 object->v.info.texture.vk_view_type =
desc->view_type;
3133 object->v.info.texture.miplevel_idx =
desc->miplevel_idx;
3134 object->v.info.texture.layer_idx =
desc->layer_idx;
3135 object->v.info.texture.layer_count =
desc->layer_count;
3149 WARN(
"Constant buffer desc is NULL.\n");
3155 ERR(
"Failed to allocate descriptor object.\n");
3166 if (
desc->BufferLocation)
3169 buffer_info->buffer =
resource->u.vk_buffer;
3170 buffer_info->offset =
desc->BufferLocation -
resource->gpu_address;
3171 buffer_info->range =
min(
desc->SizeInBytes,
resource->desc.Width - buffer_info->offset);
3176 buffer_info->buffer =
device->null_resources.vk_buffer;
3177 buffer_info->offset = 0;
3189 FIXME(
"Unhandled buffer SRV flags %#x.\n",
flags);
3202 WARN(
"D3D12_SHADER_RESOURCE_VIEW_DESC is required for NULL view.\n");
3206 switch (
desc->ViewDimension)
3209 if (!
device->vk_info.EXT_robustness2)
3210 WARN(
"Creating NULL buffer SRV %#x.\n",
desc->Format);
3227 if (
device->vk_info.EXT_robustness2)
3234 FIXME(
"Unhandled view dimension %#x.\n",
desc->ViewDimension);
3238 if (!
device->vk_info.EXT_robustness2)
3239 WARN(
"Creating NULL SRV %#x.\n",
desc->ViewDimension);
3265 FIXME(
"Default SRV views not supported.\n");
3271 WARN(
"Unexpected view dimension %#x.\n",
desc->ViewDimension);
3277 desc->u.Buffer.FirstElement,
desc->u.Buffer.NumElements,
3282 unsigned int plane_slice)
3289 for (
i = 0;
i < plane_slice;
i++)
3290 aspect_flags &= aspect_flags - 1;
3294 WARN(
"Invalid plane slice %u for format %#x.\n", plane_slice,
format->vk_format);
3295 aspect_flags =
format->vk_aspect_mask;
3299 return aspect_flags & -aspect_flags;
3329 if (
desc->Shader4ComponentMapping != D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING)
3331 TRACE(
"Component mapping %s for format %#x.\n",
3337 switch (
desc->ViewDimension)
3348 if (
desc->u.Texture2D.PlaneSlice)
3350 desc->u.Texture2D.PlaneSlice);
3351 if (
desc->u.Texture2D.ResourceMinLODClamp)
3352 FIXME(
"Unhandled min LOD clamp %.8e.\n",
desc->u.Texture2D.ResourceMinLODClamp);
3358 vkd3d_desc.
layer_idx =
desc->u.Texture2DArray.FirstArraySlice;
3360 if (
desc->u.Texture2DArray.PlaneSlice)
3362 desc->u.Texture2DArray.PlaneSlice);
3363 if (
desc->u.Texture2DArray.ResourceMinLODClamp)
3364 FIXME(
"Unhandled min LOD clamp %.8e.\n",
desc->u.Texture2DArray.ResourceMinLODClamp);
3372 vkd3d_desc.
layer_idx =
desc->u.Texture2DMSArray.FirstArraySlice;
3380 if (
desc->u.Texture3D.ResourceMinLODClamp)
3381 FIXME(
"Unhandled min LOD clamp %.8e.\n",
desc->u.Texture2D.ResourceMinLODClamp);
3388 if (
desc->u.TextureCube.ResourceMinLODClamp)
3389 FIXME(
"Unhandled min LOD clamp %.8e.\n",
desc->u.TextureCube.ResourceMinLODClamp);
3395 vkd3d_desc.
layer_idx =
desc->u.TextureCubeArray.First2DArrayFace;
3399 if (
desc->u.TextureCubeArray.ResourceMinLODClamp)
3400 FIXME(
"Unhandled min LOD clamp %.8e.\n",
desc->u.TextureCubeArray.ResourceMinLODClamp);
3404 FIXME(
"Unhandled view dimension %#x.\n",
desc->ViewDimension);
3417 FIXME(
"Unhandled buffer UAV flags %#x.\n",
flags);
3430 WARN(
"View desc is required for NULL view.\n");
3434 switch (
desc->ViewDimension)
3437 if (!
device->vk_info.EXT_robustness2)
3438 WARN(
"Creating NULL buffer UAV %#x.\n",
desc->Format);
3455 if (
device->vk_info.EXT_robustness2)
3462 FIXME(
"Unhandled view dimension %#x.\n",
desc->ViewDimension);
3466 if (!
device->vk_info.EXT_robustness2)
3467 WARN(
"Creating NULL UAV %#x.\n",
desc->ViewDimension);
3494 FIXME(
"Default UAV views not supported.\n");
3500 WARN(
"Unexpected view dimension %#x.\n",
desc->ViewDimension);
3506 desc->u.Buffer.FirstElement,
desc->u.Buffer.NumElements,
3510 if (counter_resource)
3519 desc->u.Buffer.CounterOffsetInBytes,
sizeof(
uint32_t), &
view->v.vk_counter_view))
3521 WARN(
"Failed to create counter buffer view.\n");
3544 WARN(
"UAVs cannot be created for compressed formats.\n");
3550 switch (
desc->ViewDimension)
3557 if (
desc->u.Texture2D.PlaneSlice)
3559 desc->u.Texture2D.PlaneSlice);
3564 vkd3d_desc.
layer_idx =
desc->u.Texture2DArray.FirstArraySlice;
3566 if (
desc->u.Texture2DArray.PlaneSlice)
3568 desc->u.Texture2DArray.PlaneSlice);
3575 &&
desc->u.Texture3D.WSize !=
max(1u,
3576 resource->desc.DepthOrArraySize >>
desc->u.Texture3D.MipSlice)))
3577 FIXME(
"Unhandled depth view %u-%u.\n",
3578 desc->u.Texture3D.FirstWSlice,
desc->u.Texture3D.WSize);
3581 FIXME(
"Unhandled view dimension %#x.\n",
desc->ViewDimension);
3595 if (counter_resource)
3596 FIXME(
"Ignoring counter resource %p.\n", counter_resource);
3607 if (counter_resource)
3608 FIXME(
"Unexpected counter resource for texture view.\n");
3623 if (
device->vk_info.EXT_robustness2)
3628 WARN(
"Creating null buffer view.\n");
3630 ?
device->null_resources.vk_storage_buffer :
device->null_resources.vk_buffer,
3650 FIXME(
"Unhandled filter type %#x.\n",
type);
3664 FIXME(
"Unhandled filter type %#x.\n",
type);
3683 if (
device->vk_info.KHR_sampler_mirror_clamp_to_edge)
3687 FIXME(
"Unhandled address mode %#x.\n",
mode);
3703 FIXME(
"Unhandled border colour %#x.\n", colour);
3712 float min_lod,
float max_lod, VkSampler *vk_sampler)
3718 vk_procs = &
device->vk_procs;
3722 FIXME(
"Min/max reduction mode not supported.\n");
3726 sampler_desc.
flags = 0;
3738 sampler_desc.
minLod = min_lod;
3739 sampler_desc.
maxLod = max_lod;
3748 WARN(
"Failed to create Vulkan sampler, vr %d.\n", vr);
3771 if (!
memcmp(colour, colours[
i].colour,
sizeof(colours[
i].colour)))
3772 return colours[
i].static_colour;
3775 FIXME(
"Unhandled border colour {%.8e, %.8e, %.8e, %.8e}.\n", colour[0], colour[1], colour[2], colour[3]);
3788 WARN(
"NULL sampler desc.\n");
3804 desc->AddressW,
desc->MipLODBias,
desc->MaxAnisotropy,
desc->ComparisonFunc,
3805 static_colour,
desc->MinLOD,
desc->MaxLOD, &
view->v.u.vk_sampler) < 0)
3820 desc->AddressW,
desc->MipLODBias,
desc->MaxAnisotropy,
desc->ComparisonFunc,
3821 desc->BorderColor,
desc->MinLOD,
desc->MaxLOD, vk_sampler);
3832 memset(rtv, 0,
sizeof(*rtv));
3845 FIXME(
"NULL resource RTV not implemented.\n");
3856 WARN(
"Trying to create RTV for depth/stencil format %#x.\n", vkd3d_desc.
format->dxgi_format);
3862 switch (
desc->ViewDimension)
3866 if (
desc->u.Texture2D.PlaneSlice)
3868 desc->u.Texture2D.PlaneSlice);
3873 vkd3d_desc.
layer_idx =
desc->u.Texture2DArray.FirstArraySlice;
3875 if (
desc->u.Texture2DArray.PlaneSlice)
3877 desc->u.Texture2DArray.PlaneSlice);
3885 vkd3d_desc.
layer_idx =
desc->u.Texture2DMSArray.FirstArraySlice;
3897 FIXME(
"Unhandled view dimension %#x.\n",
desc->ViewDimension);
3928 memset(dsv, 0,
sizeof(*dsv));
3941 FIXME(
"NULL resource DSV not implemented.\n");
3947 WARN(
"Cannot create DSV for 3D texture.\n");
3958 WARN(
"Trying to create DSV for format %#x.\n", vkd3d_desc.
format->dxgi_format);
3965 FIXME(
"Ignoring flags %#x.\n",
desc->Flags);
3967 switch (
desc->ViewDimension)
3975 vkd3d_desc.
layer_idx =
desc->u.Texture2DArray.FirstArraySlice;
3984 vkd3d_desc.
layer_idx =
desc->u.Texture2DMSArray.FirstArraySlice;
3989 FIXME(
"Unhandled view dimension %#x.\n",
desc->ViewDimension);
4024 ID3D12DescriptorHeap_AddRef(iface);
4062 switch (
heap->desc.Type)
4072 for (
i = 0;
i <
heap->desc.NumDescriptors; ++
i)
4084 for (
i = 0;
i <
heap->desc.NumDescriptors; ++
i)
4095 for (
i = 0;
i <
heap->desc.NumDescriptors; ++
i)
4170 TRACE(
"iface %p, desc %p.\n", iface,
desc);
4201 WARN(
"Heap %p is not shader-visible.\n", iface);
4244 VkDevice vk_device =
device->vk_device;
4250 if (
device->vk_descriptor_heap_layouts[
set].applicable_heap_type ==
desc->Type
4251 &&
device->vk_descriptor_heap_layouts[
set].vk_set_layout)
4266 ERR(
"Failed to create descriptor pool, vr %d.\n", vr);
4282 if (!
device->vk_descriptor_heap_layouts[
set].vk_set_layout)
4302 set_size.pDescriptorCounts = &variable_binding_size;
4309 ERR(
"Failed to allocate descriptor set, vr %d.\n", vr);
4331 if (
device->vk_descriptor_heap_layouts[
set].applicable_heap_type ==
desc->Type
4369 size_t max_descriptor_count, descriptor_size;
4377 WARN(
"No descriptor size for descriptor type %#x.\n",
desc->Type);
4384 WARN(
"RTV/DSV descriptor heaps cannot be shader visible.\n");
4388 max_descriptor_count = (~(
size_t)0 -
sizeof(*
object)) / descriptor_size;
4389 if (
desc->NumDescriptors > max_descriptor_count)
4391 WARN(
"Invalid descriptor count %u (max %zu).\n",
desc->NumDescriptors, max_descriptor_count);
4396 descriptors[descriptor_size *
desc->NumDescriptors]))))
4414 object->dirty_list_head =
UINT_MAX;
4427 TRACE(
"Created descriptor heap %p.\n",
object);
4429 *descriptor_heap =
object;
4451 ID3D12QueryHeap_AddRef(iface);
4583 object->refcount = 1;
4589 pool_info.
flags = 0;
4620 if (!
device->vk_info.transform_feedback_queries)
4622 FIXME(
"Transform feedback queries are not supported by Vulkan implementation.\n");
4632 WARN(
"Invalid query heap type %u.\n",
desc->Type);
4645 WARN(
"Failed to create Vulkan query pool, vr %d.\n", vr);
4653 TRACE(
"Created query heap %p.\n",
object);
4663 const bool use_sparse_resources =
device->vk_info.sparse_properties.residencyNonResidentStrict;
4669 VkDevice vk_device =
device->vk_device;
4671 VkCommandBuffer vk_command_buffer;
4685 command_pool_info.
flags = 0;
4690 WARN(
"Failed to create Vulkan command pool, vr %d.\n", vr);
4696 command_buffer_info.commandPool = vk_command_pool;
4702 WARN(
"Failed to allocate Vulkan command buffer, vr %d.\n", vr);
4713 WARN(
"Failed to begin command buffer, vr %d.\n", vr);
4720 if (use_sparse_resources)
4769 range.baseMipLevel = 0;
4770 range.levelCount = 1;
4771 range.baseArrayLayer = 0;
4772 range.layerCount = 1;
4800 WARN(
"Failed to end command buffer, vr %d.\n", vr);
4806 fence_info.
flags = 0;
4810 WARN(
"Failed to create Vulkan fence, vr %d.\n", vr);
4826 WARN(
"Failed to acquire queue %p.\n",
queue);
4831 ERR(
"Failed to submit, vr %d.\n", vr);
4837 WARN(
"Failed to wait for fence, vr %d.\n", vr);
4849 const bool use_sparse_resources =
device->vk_info.sparse_properties.residencyNonResidentStrict;
4854 TRACE(
"Creating resources for NULL views.\n");
4856 memset(null_resources, 0,
sizeof(*null_resources));
4858 if (
device->vk_info.EXT_robustness2)
4861 memset(&heap_properties, 0,
sizeof(heap_properties));
4868 resource_desc.
Height = 1;
4879 &resource_desc, &null_resources->
vk_buffer)))
4898 resource_desc.
Width = 1;
4899 resource_desc.
Height = 1;
4918 resource_desc.
Width = 1;
4919 resource_desc.
Height = 1;
4925 resource_desc.
Layout = use_sparse_resources
4949 if (!use_sparse_resources)
4982 memset(null_resources, 0,
sizeof(*null_resources));
struct outqueuenode * head
_Check_return_ _Ret_maybenull_ _In_ size_t alignment
static void set_size(float size)
#define STDMETHODCALLTYPE
void vkd3d_queue_release(struct vkd3d_queue *queue)
struct vkd3d_queue * d3d12_device_get_vkd3d_queue(struct d3d12_device *device, D3D12_COMMAND_LIST_TYPE type)
VkQueue vkd3d_queue_acquire(struct vkd3d_queue *queue)
D3D12_STATIC_BORDER_COLOR
@ D3D12_STATIC_BORDER_COLOR_TRANSPARENT_BLACK
@ D3D12_STATIC_BORDER_COLOR_OPAQUE_WHITE
@ D3D12_STATIC_BORDER_COLOR_OPAQUE_BLACK
@ D3D12_FILTER_REDUCTION_TYPE_MINIMUM
@ D3D12_FILTER_REDUCTION_TYPE_MAXIMUM
@ D3D12_RESOURCE_STATE_GENERIC_READ
@ D3D12_RESOURCE_STATE_COPY_DEST
@ D3D12_RESOURCE_STATE_RENDER_TARGET
@ D3D12_RESOURCE_STATE_COMMON
D3D12_TEXTURE_ADDRESS_MODE
@ D3D12_TEXTURE_ADDRESS_MODE_BORDER
@ D3D12_TEXTURE_ADDRESS_MODE_WRAP
@ D3D12_TEXTURE_ADDRESS_MODE_CLAMP
@ D3D12_TEXTURE_ADDRESS_MODE_MIRROR
@ D3D12_TEXTURE_ADDRESS_MODE_MIRROR_ONCE
D3D12_SHADER_COMPONENT_MAPPING
@ D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_1
@ D3D12_SHADER_COMPONENT_MAPPING_FORCE_VALUE_0
@ D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_3
@ D3D12_SHADER_COMPONENT_MAPPING_FORCE_VALUE_1
@ D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_0
@ D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_2
const UINT D3D12_PACKED_TILE
@ D3D12_FILTER_TYPE_LINEAR
@ D3D12_FILTER_TYPE_POINT
@ D3D12_RTV_DIMENSION_TEXTURE2DMSARRAY
@ D3D12_RTV_DIMENSION_TEXTURE3D
@ D3D12_RTV_DIMENSION_TEXTURE2D
@ D3D12_RTV_DIMENSION_TEXTURE2DMS
@ D3D12_RTV_DIMENSION_TEXTURE2DARRAY
@ D3D12_COMMAND_LIST_TYPE_DIRECT
@ D3D12_MEMORY_POOL_UNKNOWN
@ D3D12_RESOURCE_DIMENSION_BUFFER
@ D3D12_RESOURCE_DIMENSION_TEXTURE1D
@ D3D12_RESOURCE_DIMENSION_TEXTURE3D
@ D3D12_RESOURCE_DIMENSION_TEXTURE2D
@ D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS
@ D3D12_RESOURCE_FLAG_NONE
@ D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL
@ D3D12_RESOURCE_FLAG_ALLOW_CROSS_ADAPTER
@ D3D12_RESOURCE_FLAG_DENY_SHADER_RESOURCE
@ D3D12_RESOURCE_FLAG_ALLOW_SIMULTANEOUS_ACCESS
@ D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET
const UINT D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT
@ D3D12_DSV_DIMENSION_TEXTURE2DMSARRAY
@ D3D12_DSV_DIMENSION_TEXTURE2DMS
@ D3D12_DSV_DIMENSION_TEXTURE2D
@ D3D12_DSV_DIMENSION_TEXTURE2DARRAY
@ D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE
const UINT D3D12_TILED_RESOURCE_TILE_SIZE_IN_BYTES
@ D3D12_BUFFER_UAV_FLAG_RAW
@ D3D12_BUFFER_SRV_FLAG_RAW
@ D3D12_UAV_DIMENSION_TEXTURE2D
@ D3D12_UAV_DIMENSION_TEXTURE3D
@ D3D12_UAV_DIMENSION_TEXTURE2DARRAY
@ D3D12_UAV_DIMENSION_TEXTURE1D
@ D3D12_UAV_DIMENSION_BUFFER
@ D3D12_HEAP_FLAG_ALLOW_DISPLAY
@ D3D12_CPU_PAGE_PROPERTY_UNKNOWN
@ D3D12_CPU_PAGE_PROPERTY_WRITE_BACK
@ D3D12_CPU_PAGE_PROPERTY_WRITE_COMBINE
@ D3D12_CPU_PAGE_PROPERTY_NOT_AVAILABLE
@ D3D12_TEXTURE_LAYOUT_UNKNOWN
@ D3D12_TEXTURE_LAYOUT_ROW_MAJOR
@ D3D12_TEXTURE_LAYOUT_64KB_UNDEFINED_SWIZZLE
const UINT D3D12_SMALL_RESOURCE_PLACEMENT_ALIGNMENT
@ D3D12_SRV_DIMENSION_TEXTURE2DMSARRAY
@ D3D12_SRV_DIMENSION_TEXTURECUBE
@ D3D12_SRV_DIMENSION_TEXTURE3D
@ D3D12_SRV_DIMENSION_TEXTURECUBEARRAY
@ D3D12_SRV_DIMENSION_TEXTURE2DARRAY
@ D3D12_SRV_DIMENSION_TEXTURE2DMS
@ D3D12_SRV_DIMENSION_BUFFER
@ D3D12_SRV_DIMENSION_TEXTURE1D
@ D3D12_SRV_DIMENSION_TEXTURE2D
D3D12_ROOT_PARAMETER_TYPE
@ D3D12_ROOT_PARAMETER_TYPE_UAV
@ D3D12_QUERY_HEAP_TYPE_TIMESTAMP
@ D3D12_QUERY_HEAP_TYPE_SO_STATISTICS
@ D3D12_QUERY_HEAP_TYPE_PIPELINE_STATISTICS
@ D3D12_QUERY_HEAP_TYPE_OCCLUSION
@ D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV
@ D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER
@ D3D12_DESCRIPTOR_HEAP_TYPE_RTV
@ D3D12_DESCRIPTOR_HEAP_TYPE_DSV
const UINT D3D12_CONSTANT_BUFFER_DATA_PLACEMENT_ALIGNMENT
const UINT D3D12_DEFAULT_MSAA_RESOURCE_PLACEMENT_ALIGNMENT
@ D3D12_HEAP_TYPE_DEFAULT
@ D3D12_HEAP_TYPE_READBACK
UINT64 D3D12_GPU_VIRTUAL_ADDRESS
size_t const element_size
_ACRTIMP int __cdecl memcmp(const void *, const void *, 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
GLenum GLenum GLuint components
GLboolean GLboolean GLboolean b
GLenum GLenum GLenum GLenum mapping
GLboolean GLboolean GLboolean GLboolean a
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
static BOOL is_null(jsval_t v)
#define memcpy(s1, s2, n)
D3D11_SHADER_VARIABLE_DESC desc
static ULONG ** element_count
#define IsEqualGUID(rguid1, rguid2)
for(i=0;i< sizeof(testsuite)/sizeof(testsuite[0]);++i) ok(call_test(testsuite[i].func)
static unsigned __int64 next
#define offsetof(TYPE, MEMBER)
void vkd3d_gpu_va_allocator_free(struct vkd3d_gpu_va_allocator *allocator, D3D12_GPU_VIRTUAL_ADDRESS address)
void * vkd3d_gpu_va_allocator_dereference(struct vkd3d_gpu_va_allocator *allocator, D3D12_GPU_VIRTUAL_ADDRESS address)
HRESULT d3d12_device_add_descriptor_heap(struct d3d12_device *device, struct d3d12_descriptor_heap *heap)
D3D12_GPU_VIRTUAL_ADDRESS vkd3d_gpu_va_allocator_allocate(struct vkd3d_gpu_va_allocator *allocator, size_t alignment, uint64_t size, void *ptr)
struct d3d12_device * unsafe_impl_from_ID3D12Device9(ID3D12Device9 *iface)
bool d3d12_device_is_uma(struct d3d12_device *device, bool *coherent)
void d3d12_device_remove_descriptor_heap(struct d3d12_device *device, struct d3d12_descriptor_heap *heap)
static ULONG d3d12_resource_incref(struct d3d12_resource *resource)
ULONG vkd3d_resource_decref(ID3D12Resource *resource)
static HRESULT STDMETHODCALLTYPE d3d12_resource_ReadFromSubresource(ID3D12Resource2 *iface, void *dst_data, UINT dst_row_pitch, UINT dst_slice_pitch, UINT src_sub_resource, const D3D12_BOX *src_box)
static HRESULT STDMETHODCALLTYPE d3d12_resource_SetName(ID3D12Resource2 *iface, const WCHAR *name)
static HRESULT STDMETHODCALLTYPE d3d12_heap_GetDevice(ID3D12Heap *iface, REFIID iid, void **device)
static void * d3d12_resource_get_map_ptr(struct d3d12_resource *resource)
static struct d3d12_heap * impl_from_ID3D12Heap(ID3D12Heap *iface)
static D3D12_RESOURCE_DESC *STDMETHODCALLTYPE d3d12_resource_GetDesc(ID3D12Resource2 *iface, D3D12_RESOURCE_DESC *resource_desc)
static HRESULT vkd3d_select_memory_type(struct d3d12_device *device, uint32_t memory_type_mask, const D3D12_HEAP_PROPERTIES *heap_properties, D3D12_HEAP_FLAGS heap_flags, unsigned int *type_index)
VkSampleCountFlagBits vk_samples_from_dxgi_sample_desc(const DXGI_SAMPLE_DESC *desc)
static HRESULT STDMETHODCALLTYPE d3d12_query_heap_QueryInterface(ID3D12QueryHeap *iface, REFIID iid, void **out)
static void descriptor_writes_free_object_refs(struct descriptor_writes *writes, struct d3d12_device *device)
static ULONG d3d12_resource_decref(struct d3d12_resource *resource)
void d3d12_desc_create_cbv(struct d3d12_desc *descriptor, struct d3d12_device *device, const D3D12_CONSTANT_BUFFER_VIEW_DESC *desc)
static VkBorderColor vk_border_colour_from_d3d12(D3D12_STATIC_BORDER_COLOR colour)
static void vkd3d_desc_object_cache_push(struct vkd3d_desc_object_cache *cache, void *object)
static bool d3d12_resource_validate_heap_properties(const struct d3d12_resource *resource, const D3D12_HEAP_PROPERTIES *heap_properties, D3D12_RESOURCE_STATES initial_state)
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)
static unsigned int vkd3d_view_flags_from_d3d12_buffer_uav_flags(D3D12_BUFFER_UAV_FLAGS flags)
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)
static HRESULT STDMETHODCALLTYPE d3d12_resource_GetPrivateData(ID3D12Resource2 *iface, REFGUID guid, UINT *data_size, void *data)
static void vkd3d_create_texture_uav(struct d3d12_desc *descriptor, struct d3d12_device *device, struct d3d12_resource *resource, const D3D12_UNORDERED_ACCESS_VIEW_DESC *desc)
static bool is_cpu_accessible_heap(const D3D12_HEAP_PROPERTIES *properties)
static HRESULT STDMETHODCALLTYPE d3d12_resource_QueryInterface(ID3D12Resource2 *iface, REFIID riid, void **object)
static HRESULT STDMETHODCALLTYPE d3d12_query_heap_GetDevice(ID3D12QueryHeap *iface, REFIID iid, void **device)
static ULONG STDMETHODCALLTYPE d3d12_resource_AddRef(ID3D12Resource2 *iface)
static void vkd3d_create_null_uav(struct d3d12_desc *descriptor, struct d3d12_device *device, const D3D12_UNORDERED_ACCESS_VIEW_DESC *desc)
static const struct ID3D12HeapVtbl d3d12_heap_vtbl
static void vkd3d_create_buffer_srv(struct d3d12_desc *descriptor, struct d3d12_device *device, struct d3d12_resource *resource, const D3D12_SHADER_RESOURCE_VIEW_DESC *desc)
static bool d3d12_resource_validate_texture_alignment(const D3D12_RESOURCE_DESC1 *desc, const struct vkd3d_format *format)
static HRESULT vkd3d_bind_heap_memory(struct d3d12_device *device, struct d3d12_resource *resource, struct d3d12_heap *heap, uint64_t heap_offset)
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)
static void d3d12_heap_resource_destroyed(struct d3d12_heap *heap)
static void d3d12_rtv_desc_destroy(struct d3d12_rtv_desc *rtv, struct d3d12_device *device)
static HRESULT vkd3d_allocate_resource_memory(struct d3d12_device *device, struct d3d12_resource *resource, const D3D12_HEAP_PROPERTIES *heap_properties, D3D12_HEAP_FLAGS heap_flags)
static const struct ID3D12QueryHeapVtbl d3d12_query_heap_vtbl
void d3d12_desc_copy(struct d3d12_desc *dst, const struct d3d12_desc *src, struct d3d12_descriptor_heap *dst_heap, struct d3d12_device *device)
static VkMemoryPropertyFlags d3d12_heap_get_memory_property_flags(const struct d3d12_heap *heap)
static void d3d12_resource_get_level_box(const struct d3d12_resource *resource, unsigned int level, D3D12_BOX *box)
static D3D12_DESCRIPTOR_HEAP_DESC *STDMETHODCALLTYPE d3d12_descriptor_heap_GetDesc(ID3D12DescriptorHeap *iface, D3D12_DESCRIPTOR_HEAP_DESC *desc)
uint64_t object_global_serial_id
static HRESULT STDMETHODCALLTYPE d3d12_heap_QueryInterface(ID3D12Heap *iface, REFIID iid, void **object)
static bool vkd3d_create_vk_buffer_view(struct d3d12_device *device, VkBuffer vk_buffer, const struct vkd3d_format *format, VkDeviceSize offset, VkDeviceSize range, VkBufferView *vk_view)
#define VKD3D_DESCRIPTOR_WRITE_BUFFER_SIZE
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)
static ULONG STDMETHODCALLTYPE d3d12_resource_Release(ID3D12Resource2 *iface)
static D3D12_STATIC_BORDER_COLOR d3d12_static_border_colour(const float *colour)
static void vkd3d_create_buffer_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)
void d3d12_desc_flush_vk_heap_updates_locked(struct d3d12_descriptor_heap *descriptor_heap, struct d3d12_device *device)
HRESULT vkd3d_create_image_resource(ID3D12Device *device, const struct vkd3d_image_resource_create_info *create_info, ID3D12Resource **resource)
static HRESULT STDMETHODCALLTYPE d3d12_query_heap_SetPrivateDataInterface(ID3D12QueryHeap *iface, REFGUID guid, const IUnknown *data)
static VkSamplerMipmapMode vk_mipmap_mode_from_d3d12(D3D12_FILTER_TYPE type)
static HRESULT d3d12_descriptor_heap_init(struct d3d12_descriptor_heap *descriptor_heap, struct d3d12_device *device, const D3D12_DESCRIPTOR_HEAP_DESC *desc)
static void descriptor_heap_write_atomic(struct d3d12_descriptor_heap *descriptor_heap, struct d3d12_desc *dst, const struct d3d12_desc *src, struct d3d12_device *device)
static struct vkd3d_cbuffer_desc * vkd3d_cbuffer_desc_create(struct d3d12_device *device)
static void d3d12_desc_destroy(struct d3d12_desc *descriptor, struct d3d12_device *device)
static HRESULT STDMETHODCALLTYPE d3d12_resource_WriteToSubresource(ID3D12Resource2 *iface, UINT dst_sub_resource, const D3D12_BOX *dst_box, const void *src_data, UINT src_row_pitch, UINT src_slice_pitch)
static D3D12_GPU_VIRTUAL_ADDRESS STDMETHODCALLTYPE d3d12_resource_GetGPUVirtualAddress(ID3D12Resource2 *iface)
static VkImageAspectFlags vk_image_aspect_flags_from_d3d12_plane_slice(const struct vkd3d_format *format, unsigned int plane_slice)
static ULONG STDMETHODCALLTYPE d3d12_heap_Release(ID3D12Heap *iface)
static HRESULT STDMETHODCALLTYPE d3d12_query_heap_GetPrivateData(ID3D12QueryHeap *iface, REFGUID guid, UINT *data_size, void *data)
static bool vkd3d_is_linear_tiling_supported(const struct d3d12_device *device, VkImageCreateInfo *image_info)
static HRESULT d3d12_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, struct d3d12_resource **resource)
HRESULT d3d12_resource_validate_desc(const D3D12_RESOURCE_DESC1 *desc, struct d3d12_device *device)
#define VKD3D_NULL_VIEW_FORMAT
static const struct ID3D12Resource2Vtbl d3d12_resource_vtbl
static void d3d12_dsv_desc_destroy(struct d3d12_dsv_desc *dsv, struct d3d12_device *device)
void vkd3d_destroy_null_resources(struct vkd3d_null_resources *null_resources, struct d3d12_device *device)
static void STDMETHODCALLTYPE d3d12_resource_Unmap(ID3D12Resource2 *iface, UINT sub_resource, const D3D12_RANGE *written_range)
static void vk_component_mapping_from_d3d12(VkComponentMapping *components, unsigned int component_mapping)
static struct vkd3d_view * vkd3d_view_create(uint32_t magic, VkDescriptorType vk_descriptor_type, enum vkd3d_view_type type, struct d3d12_device *device)
static ULONG STDMETHODCALLTYPE d3d12_query_heap_Release(ID3D12QueryHeap *iface)
static HRESULT STDMETHODCALLTYPE d3d12_resource_GetProtectedResourceSession(ID3D12Resource2 *iface, REFIID iid, void **session)
static void d3d12_validate_resource_flags(D3D12_RESOURCE_FLAGS flags)
static void d3d12_desc_mark_as_modified(struct d3d12_desc *dst, struct d3d12_descriptor_heap *descriptor_heap)
static void d3d12_resource_tile_info_cleanup(struct d3d12_resource *resource)
static void vkd3d_texture_view_desc_normalise(struct vkd3d_texture_view_desc *desc, const D3D12_RESOURCE_DESC1 *resource_desc)
static void compute_image_subresource_size_in_tiles(const VkExtent3D *tile_extent, const struct D3D12_RESOURCE_DESC1 *desc, unsigned int miplevel_idx, struct vkd3d_tiled_region_extent *size)
static const struct ID3D12DescriptorHeapVtbl d3d12_descriptor_heap_vtbl
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)
static HRESULT STDMETHODCALLTYPE d3d12_resource_Map(ID3D12Resource2 *iface, UINT sub_resource, const D3D12_RANGE *read_range, void **data)
static HRESULT STDMETHODCALLTYPE d3d12_query_heap_SetName(ID3D12QueryHeap *iface, const WCHAR *name)
static bool d3d12_resource_validate_texture_format(const D3D12_RESOURCE_DESC1 *desc, const struct vkd3d_format *format)
static HRESULT STDMETHODCALLTYPE d3d12_resource_GetHeapProperties(ID3D12Resource2 *iface, D3D12_HEAP_PROPERTIES *heap_properties, D3D12_HEAP_FLAGS *flags)
static bool init_default_texture_view_desc(struct vkd3d_texture_view_desc *desc, struct d3d12_resource *resource, DXGI_FORMAT view_format)
static D3D12_RESOURCE_DESC1 *STDMETHODCALLTYPE d3d12_resource_GetDesc1(ID3D12Resource2 *iface, D3D12_RESOURCE_DESC1 *resource_desc)
static void d3d12_heap_destroy(struct d3d12_heap *heap)
static VkComponentSwizzle vk_component_swizzle_from_d3d12(unsigned int component_mapping, unsigned int component_index)
static void d3d12_resource_flush(struct d3d12_resource *resource, uint64_t offset, uint64_t size)
static HRESULT vkd3d_create_image(struct d3d12_device *device, const D3D12_HEAP_PROPERTIES *heap_properties, D3D12_HEAP_FLAGS heap_flags, const D3D12_RESOURCE_DESC1 *desc, struct d3d12_resource *resource, VkImage *vk_image)
static void d3d12_resource_get_vk_range(struct d3d12_resource *resource, uint64_t offset, uint64_t size, VkMappedMemoryRange *vk_range)
ULONG vkd3d_resource_incref(ID3D12Resource *resource)
static HRESULT STDMETHODCALLTYPE d3d12_resource_SetPrivateData(ID3D12Resource2 *iface, REFGUID guid, UINT data_size, const void *data)
static void d3d12_desc_write_vk_heap(struct d3d12_descriptor_heap *descriptor_heap, unsigned int dst_array_element, struct descriptor_writes *writes, void *object, struct d3d12_device *device)
void vkd3d_view_decref(void *view, struct d3d12_device *device)
static HRESULT vkd3d_allocate_device_memory(struct d3d12_device *device, const D3D12_HEAP_PROPERTIES *heap_properties, D3D12_HEAP_FLAGS heap_flags, const VkMemoryRequirements *memory_requirements, const VkMemoryDedicatedAllocateInfo *dedicated_allocate_info, VkDeviceMemory *vk_memory, uint32_t *vk_memory_type)
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)
static void vkd3d_view_destroy(struct vkd3d_view *view, struct d3d12_device *device)
static HRESULT STDMETHODCALLTYPE d3d12_query_heap_SetPrivateData(ID3D12QueryHeap *iface, REFGUID guid, UINT data_size, const void *data)
bool vkd3d_create_raw_buffer_view(struct d3d12_device *device, D3D12_GPU_VIRTUAL_ADDRESS gpu_address, D3D12_ROOT_PARAMETER_TYPE parameter_type, VkBufferView *vk_buffer_view)
static VkDeviceSize vkd3d_get_required_texel_buffer_alignment(const struct d3d12_device *device, const struct vkd3d_format *format)
HRESULT vkd3d_create_buffer(struct d3d12_device *device, const D3D12_HEAP_PROPERTIES *heap_properties, D3D12_HEAP_FLAGS heap_flags, const D3D12_RESOURCE_DESC1 *desc, VkBuffer *vk_buffer)
static HRESULT STDMETHODCALLTYPE d3d12_resource_GetDevice(ID3D12Resource2 *iface, REFIID iid, void **device)
HRESULT d3d12_descriptor_heap_create(struct d3d12_device *device, const D3D12_DESCRIPTOR_HEAP_DESC *desc, struct d3d12_descriptor_heap **descriptor_heap)
static unsigned int vkd3d_view_flags_from_d3d12_buffer_srv_flags(D3D12_BUFFER_SRV_FLAGS flags)
static void d3d12_resource_destroy(struct d3d12_resource *resource, struct d3d12_device *device)
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)
HRESULT vkd3d_create_static_sampler(struct d3d12_device *device, const D3D12_STATIC_SAMPLER_DESC *desc, VkSampler *vk_sampler)
static D3D12_CPU_DESCRIPTOR_HANDLE *STDMETHODCALLTYPE d3d12_descriptor_heap_GetCPUDescriptorHandleForHeapStart(ID3D12DescriptorHeap *iface, D3D12_CPU_DESCRIPTOR_HANDLE *descriptor)
static VkImageType vk_image_type_from_d3d12_resource_dimension(D3D12_RESOURCE_DIMENSION dimension)
static struct d3d12_query_heap * impl_from_ID3D12QueryHeap(ID3D12QueryHeap *iface)
static HRESULT STDMETHODCALLTYPE d3d12_heap_GetPrivateData(ID3D12Heap *iface, REFGUID guid, UINT *data_size, void *data)
enum vkd3d_vk_descriptor_set_index vk_descriptor_set_index_table[]
static void d3d12_desc_write_vk_heap_null_descriptor(struct d3d12_descriptor_heap *descriptor_heap, uint32_t dst_array_element, struct descriptor_writes *writes, struct d3d12_device *device)
static HRESULT STDMETHODCALLTYPE d3d12_descriptor_heap_QueryInterface(ID3D12DescriptorHeap *iface, REFIID riid, void **object)
#define VKD3D_VIEW_RAW_BUFFER
static VkSamplerAddressMode vk_address_mode_from_d3d12(const struct d3d12_device *device, D3D12_TEXTURE_ADDRESS_MODE mode)
static ULONG STDMETHODCALLTYPE d3d12_heap_AddRef(ID3D12Heap *iface)
static HRESULT STDMETHODCALLTYPE d3d12_descriptor_heap_GetPrivateData(ID3D12DescriptorHeap *iface, REFGUID guid, UINT *data_size, void *data)
bool d3d12_resource_is_cpu_accessible(const struct d3d12_resource *resource)
static HRESULT STDMETHODCALLTYPE d3d12_descriptor_heap_SetPrivateDataInterface(ID3D12DescriptorHeap *iface, REFGUID guid, const IUnknown *data)
static unsigned int max_miplevel_count(const D3D12_RESOURCE_DESC1 *desc)
static void d3d12_desc_replace(struct d3d12_desc *dst, void *view, struct d3d12_device *device)
static ULONG STDMETHODCALLTYPE d3d12_descriptor_heap_AddRef(ID3D12DescriptorHeap *iface)
static bool d3d12_resource_init_tiles(struct d3d12_resource *resource, struct d3d12_device *device)
bool vkd3d_create_buffer_view(struct d3d12_device *device, uint32_t magic, VkBuffer vk_buffer, const struct vkd3d_format *format, VkDeviceSize offset, VkDeviceSize size, struct vkd3d_view **view)
static HRESULT STDMETHODCALLTYPE d3d12_descriptor_heap_SetPrivateData(ID3D12DescriptorHeap *iface, REFGUID guid, UINT data_size, const void *data)
static void vkd3d_set_view_swizzle_for_format(VkComponentMapping *components, const struct vkd3d_format *format, bool allowed_swizzle)
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)
static D3D12_GPU_DESCRIPTOR_HANDLE *STDMETHODCALLTYPE d3d12_descriptor_heap_GetGPUDescriptorHandleForHeapStart(ID3D12DescriptorHeap *iface, D3D12_GPU_DESCRIPTOR_HANDLE *descriptor)
static D3D12_HEAP_DESC *STDMETHODCALLTYPE d3d12_heap_GetDesc(ID3D12Heap *iface, D3D12_HEAP_DESC *desc)
HRESULT d3d12_query_heap_create(struct d3d12_device *device, const D3D12_QUERY_HEAP_DESC *desc, struct d3d12_query_heap **heap)
static void vkd3d_create_null_srv(struct d3d12_desc *descriptor, struct d3d12_device *device, const D3D12_SHADER_RESOURCE_VIEW_DESC *desc)
void d3d12_desc_create_srv(struct d3d12_desc *descriptor, struct d3d12_device *device, struct d3d12_resource *resource, const D3D12_SHADER_RESOURCE_VIEW_DESC *desc)
static const struct vkd3d_format_compatibility_list * vkd3d_get_format_compatibility_list(const struct d3d12_device *device, DXGI_FORMAT dxgi_format)
static HRESULT d3d12_descriptor_heap_vk_descriptor_sets_init(struct d3d12_descriptor_heap *descriptor_heap, struct d3d12_device *device, const D3D12_DESCRIPTOR_HEAP_DESC *desc)
static HRESULT d3d12_resource_init(struct d3d12_resource *resource, 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)
static bool vkd3d_create_buffer_view_for_resource(struct d3d12_device *device, uint32_t magic, struct d3d12_resource *resource, DXGI_FORMAT view_format, unsigned int offset, unsigned int size, unsigned int structure_stride, unsigned int flags, struct vkd3d_view **view)
struct d3d12_resource * unsafe_impl_from_ID3D12Resource(ID3D12Resource *iface)
bool vkd3d_create_texture_view(struct d3d12_device *device, uint32_t magic, VkImage vk_image, const struct vkd3d_texture_view_desc *desc, struct vkd3d_view **view)
static HRESULT STDMETHODCALLTYPE d3d12_heap_SetName(ID3D12Heap *iface, const WCHAR *name)
static HRESULT d3d12_descriptor_heap_create_descriptor_set(struct d3d12_descriptor_heap *descriptor_heap, struct d3d12_device *device, unsigned int set)
static HRESULT STDMETHODCALLTYPE d3d12_resource_SetPrivateDataInterface(ID3D12Resource2 *iface, REFGUID guid, const IUnknown *data)
static ULONG STDMETHODCALLTYPE d3d12_query_heap_AddRef(ID3D12QueryHeap *iface)
static HRESULT STDMETHODCALLTYPE d3d12_descriptor_heap_GetDevice(ID3D12DescriptorHeap *iface, REFIID iid, void **device)
static HRESULT vkd3d_allocate_image_memory(struct d3d12_device *device, VkImage vk_image, const D3D12_HEAP_PROPERTIES *heap_properties, D3D12_HEAP_FLAGS heap_flags, VkDeviceMemory *vk_memory, uint32_t *vk_memory_type, VkDeviceSize *vk_memory_size)
static VkFilter vk_filter_from_d3d12(D3D12_FILTER_TYPE type)
void d3d12_desc_write_atomic(struct d3d12_desc *dst, const struct d3d12_desc *src, struct d3d12_device *device)
static HRESULT d3d12_descriptor_heap_create_descriptor_pool(struct d3d12_descriptor_heap *descriptor_heap, struct d3d12_device *device, const D3D12_DESCRIPTOR_HEAP_DESC *desc)
HRESULT vkd3d_init_null_resources(struct vkd3d_null_resources *null_resources, struct d3d12_device *device)
static void d3d12_resource_invalidate(struct d3d12_resource *resource, uint64_t offset, uint64_t size)
#define VKD3D_NULL_BUFFER_SIZE
static HRESULT STDMETHODCALLTYPE d3d12_heap_SetPrivateDataInterface(ID3D12Heap *iface, REFGUID guid, const IUnknown *data)
static struct d3d12_descriptor_heap * impl_from_ID3D12DescriptorHeap(ID3D12DescriptorHeap *iface)
static HRESULT vkd3d_init_null_resources_data(struct vkd3d_null_resources *null_resource, struct d3d12_device *device)
static HRESULT STDMETHODCALLTYPE d3d12_heap_SetPrivateData(ID3D12Heap *iface, REFGUID guid, UINT data_size, const void *data)
static HRESULT d3d12_heap_init(struct d3d12_heap *heap, struct d3d12_device *device, const D3D12_HEAP_DESC *desc, const struct d3d12_resource *resource)
static HRESULT validate_heap_desc(const D3D12_HEAP_DESC *desc, const struct d3d12_resource *resource)
static void vk_component_mapping_compose(VkComponentMapping *dst, const VkComponentMapping *b)
VkSampleCountFlagBits vk_samples_from_sample_count(unsigned int sample_count)
struct d3d12_query_heap * unsafe_impl_from_ID3D12QueryHeap(ID3D12QueryHeap *iface)
static ULONG STDMETHODCALLTYPE d3d12_descriptor_heap_Release(ID3D12DescriptorHeap *iface)
static VkComponentSwizzle swizzle_vk_component(const VkComponentMapping *components, VkComponentSwizzle component, VkComponentSwizzle swizzle)
HRESULT vkd3d_allocate_buffer_memory(struct d3d12_device *device, VkBuffer vk_buffer, const D3D12_HEAP_PROPERTIES *heap_properties, D3D12_HEAP_FLAGS heap_flags, VkDeviceMemory *vk_memory, uint32_t *vk_memory_type, VkDeviceSize *vk_memory_size)
void d3d12_desc_create_sampler(struct d3d12_desc *sampler, struct d3d12_device *device, const D3D12_SAMPLER_DESC *desc)
static void * vkd3d_desc_object_cache_get(struct vkd3d_desc_object_cache *cache)
static VkResult d3d12_create_sampler(struct d3d12_device *device, D3D12_FILTER filter, D3D12_TEXTURE_ADDRESS_MODE address_u, D3D12_TEXTURE_ADDRESS_MODE address_v, D3D12_TEXTURE_ADDRESS_MODE address_w, float mip_lod_bias, unsigned int max_anisotropy, D3D12_COMPARISON_FUNC comparison_func, D3D12_STATIC_BORDER_COLOR border_colour, float min_lod, float max_lod, VkSampler *vk_sampler)
static HRESULT STDMETHODCALLTYPE d3d12_descriptor_heap_SetName(ID3D12DescriptorHeap *iface, const WCHAR *name)
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)
static bool d3d12_resource_validate_box(const struct d3d12_resource *resource, unsigned int sub_resource_idx, const D3D12_BOX *box)
enum VkCompareOp vk_compare_op_from_d3d12(D3D12_COMPARISON_FUNC op)
HRESULT vkd3d_set_private_data(struct vkd3d_private_store *store, const GUID *tag, unsigned int data_size, const void *data)
bool is_valid_resource_state(D3D12_RESOURCE_STATES state)
const char * debug_d3d12_shader_component_mapping(unsigned int mapping)
HRESULT vkd3d_set_private_data_interface(struct vkd3d_private_store *store, const GUID *tag, const IUnknown *object)
VkResult vkd3d_set_vk_object_name_utf8(struct d3d12_device *device, uint64_t vk_object, VkDebugReportObjectTypeEXT vk_object_type, const char *name)
void vkd3d_format_copy_data(const struct vkd3d_format *format, const uint8_t *src, unsigned int src_row_pitch, unsigned int src_slice_pitch, uint8_t *dst, unsigned int dst_row_pitch, unsigned int dst_slice_pitch, unsigned int w, unsigned int h, unsigned int d)
const struct vkd3d_format * vkd3d_get_format(const struct d3d12_device *device, DXGI_FORMAT dxgi_format, bool depth_stencil)
HRESULT vkd3d_set_vk_object_name(struct d3d12_device *device, uint64_t vk_object, VkDebugReportObjectTypeEXT vk_object_type, const WCHAR *name)
const char * debug_d3d12_box(const D3D12_BOX *box)
HRESULT vkd3d_get_private_data(struct vkd3d_private_store *store, const GUID *tag, unsigned int *out_size, void *out)
D3D12_HEAP_PROPERTIES Properties
D3D12_CPU_PAGE_PROPERTY CPUPageProperty
D3D12_MEMORY_POOL MemoryPoolPreference
UINT NumTilesForPackedMips
UINT StartTileIndexInOverallResource
D3D12_RESOURCE_DIMENSION Dimension
D3D12_RESOURCE_FLAGS Flags
D3D12_TEXTURE_LAYOUT Layout
DXGI_SAMPLE_DESC SampleDesc
D3D12_MIP_REGION SamplerFeedbackMipRegion
UINT StartTileIndexInOverallResource
uint32_t queueFamilyIndexCount
const uint32_t * pQueueFamilyIndices
VkBufferCreateFlags flags
VkSharingMode sharingMode
VkBufferViewCreateFlags flags
uint32_t commandBufferCount
VkCommandBufferLevel level
const VkCommandBufferInheritanceInfo * pInheritanceInfo
VkCommandBufferUsageFlags flags
uint32_t queueFamilyIndex
VkCommandPoolCreateFlags flags
VkImageLayout imageLayout
const VkDescriptorPoolSize * pPoolSizes
VkDescriptorPoolCreateFlags flags
uint32_t descriptorSetCount
const VkDescriptorSetLayout * pSetLayouts
VkSharingMode sharingMode
VkImageLayout initialLayout
const uint32_t * pQueueFamilyIndices
VkSampleCountFlagBits samples
uint32_t queueFamilyIndexCount
VkAccessFlags dstAccessMask
uint32_t dstQueueFamilyIndex
VkAccessFlags srcAccessMask
VkImageSubresourceRange subresourceRange
uint32_t srcQueueFamilyIndex
VkImageAspectFlags aspectMask
VkImageAspectFlags aspectMask
VkImageSubresourceRange subresourceRange
VkComponentMapping components
VkImageViewCreateFlags flags
VkBool32 prefersDedicatedAllocation
VkMemoryPropertyFlags propertyFlags
VkMemoryType memoryTypes[VK_MAX_MEMORY_TYPES]
VkBool32 storageTexelBufferOffsetSingleTexelAlignment
VkBool32 uniformTexelBufferOffsetSingleTexelAlignment
VkQueryPipelineStatisticFlags pipelineStatistics
VkQueryPoolCreateFlags flags
VkBool32 unnormalizedCoordinates
VkSamplerAddressMode addressModeU
VkBool32 anisotropyEnable
VkBorderColor borderColor
VkSamplerMipmapMode mipmapMode
VkSamplerAddressMode addressModeW
VkSamplerCreateFlags flags
VkSamplerAddressMode addressModeV
VkSparseImageFormatProperties formatProperties
uint32_t imageMipTailFirstLod
uint32_t waitSemaphoreCount
const VkPipelineStageFlags * pWaitDstStageMask
uint32_t commandBufferCount
const VkSemaphore * pWaitSemaphores
uint32_t signalSemaphoreCount
const VkCommandBuffer * pCommandBuffers
const VkSemaphore * pSignalSemaphores
const VkBufferView * pTexelBufferView
const VkDescriptorImageInfo * pImageInfo
const VkDescriptorBufferInfo * pBufferInfo
VkDescriptorType descriptorType
struct d3d12_desc::@6032 s
struct vkd3d_mutex vk_sets_mutex
D3D12_DESCRIPTOR_HEAP_DESC desc
struct d3d12_descriptor_heap_vk_set vk_descriptor_sets[VKD3D_SET_INDEX_COUNT]
struct vkd3d_private_store private_store
ID3D12DescriptorHeap ID3D12DescriptorHeap_iface
struct d3d12_device * device
unsigned int volatile dirty_list_head
VkDescriptorPool vk_descriptor_pool
struct vkd3d_vk_device_procs vk_procs
VkSampleCountFlagBits sample_count
struct d3d12_resource * resource
const struct vkd3d_format * format
ID3D12Heap ID3D12Heap_iface
uint64_t availability_mask[]
struct d3d12_device * device
ID3D12QueryHeap ID3D12QueryHeap_iface
union d3d12_resource::@6027 u
D3D12_RESOURCE_STATES initial_state
D3D12_GPU_VIRTUAL_ADDRESS gpu_address
VkSampleCountFlagBits sample_count
const struct vkd3d_format * format
struct d3d12_resource * resource
void * held_refs[VKD3D_DESCRIPTOR_WRITE_BUFFER_SIZE]
VkDescriptorBufferInfo null_vk_cbv_info
VkBufferView null_vk_buffer_view
VkDescriptorImageInfo vk_image_infos[VKD3D_DESCRIPTOR_WRITE_BUFFER_SIZE]
unsigned int held_ref_count
VkWriteDescriptorSet vk_descriptor_writes[VKD3D_DESCRIPTOR_WRITE_BUFFER_SIZE]
VkDescriptorBufferInfo vk_cbv_info
D3D12_RESOURCE_STATES present_state
enum vkd3d_structure_type type
VkImage vk_2d_storage_image
VkBuffer vk_storage_buffer
VkDeviceMemory vk_buffer_memory
VkDeviceMemory vk_2d_image_memory
VkDeviceMemory vk_2d_storage_image_memory
VkDeviceMemory vk_storage_buffer_memory
struct vkd3d_tiled_region_extent extent
unsigned int miplevel_idx
VkComponentMapping components
const struct vkd3d_format * format
VkImageAspectFlags vk_image_aspect
unsigned int miplevel_count
VkImageViewType view_type
VkPhysicalDeviceLimits device_limits
bool EXT_texel_buffer_alignment
VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT texel_buffer_alignment_properties
#define CONTAINING_RECORD(address, type, field)
@ VKD3D_STRUCTURE_TYPE_IMAGE_RESOURCE_CREATE_INFO
#define VKD3D_RESOURCE_PRESENT_STATE_TRANSITION
#define VKD3D_RESOURCE_INITIAL_STATE_TRANSITION
static void * vkd3d_atomic_exchange_ptr(void *volatile *x, void *val)
static const char * debugstr_hresult(HRESULT hr)
static uint64_t vkd3d_atomic_increment_u64(uint64_t volatile *x)
static unsigned int vkd3d_log2i(unsigned int x)
static void vkd3d_mutex_init(struct vkd3d_mutex *lock)
static void vkd3d_mutex_unlock(struct vkd3d_mutex *lock)
static void vkd3d_mutex_lock(struct vkd3d_mutex *lock)
static uint32_t vkd3d_atomic_exchange_u32(uint32_t volatile *x, uint32_t val)
static void vkd3d_mutex_destroy(struct vkd3d_mutex *lock)
static uint32_t vkd3d_atomic_decrement_u32(uint32_t volatile *x)
static bool vkd3d_atomic_compare_exchange_u32(uint32_t volatile *x, uint32_t expected, uint32_t val)
#define VKD3D_ASSERT(cond)
static uint32_t vkd3d_atomic_increment_u32(uint32_t volatile *x)
#define DIV_ROUND_UP(a, b)
static void * vkd3d_calloc(size_t count, size_t size)
static void vkd3d_free(void *ptr)
static void * vkd3d_malloc(size_t size)
#define VKD3D_DESCRIPTOR_MAGIC_SRV
static bool vkd3d_format_is_compressed(const struct vkd3d_format *format)
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
@ VKD3D_FORMAT_TYPE_TYPELESS
static void vkd3d_private_store_destroy(struct vkd3d_private_store *store)
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)
static unsigned int d3d12_device_get_descriptor_handle_increment_size(struct d3d12_device *device, D3D12_DESCRIPTOR_HEAP_TYPE descriptor_type)
#define VKD3D_DESCRIPTOR_MAGIC_DSV
#define VKD3D_DESCRIPTOR_MAGIC_CBV
static enum vkd3d_vk_descriptor_set_index vkd3d_vk_descriptor_set_index_from_vk_descriptor_type(VkDescriptorType 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 bool d3d12_box_is_empty(const D3D12_BOX *box)
static struct d3d12_resource * impl_from_ID3D12Resource2(ID3D12Resource2 *iface)
static unsigned int d3d12_resource_desc_get_width(const D3D12_RESOURCE_DESC1 *desc, unsigned int miplevel_idx)
#define VKD3D_DESCRIPTOR_MAGIC_RTV
static bool d3d12_resource_is_buffer(const struct d3d12_resource *resource)
static void debug_ignored_node_mask(unsigned int mask)
#define VKD3D_RESOURCE_LINEAR_TILING
static HRESULT vkd3d_private_store_init(struct vkd3d_private_store *store)
static unsigned int d3d12_resource_desc_get_layer_count(const D3D12_RESOURCE_DESC1 *desc)
static size_t vkd3d_format_get_data_offset(const struct vkd3d_format *format, unsigned int row_pitch, unsigned int slice_pitch, unsigned int x, unsigned int y, unsigned int z)
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)
#define VKD3D_RESOURCE_EXTERNAL
#define VKD3D_RESOURCE_DEDICATED_HEAP
static void * d3d12_desc_get_object_ref(const volatile struct d3d12_desc *src, struct d3d12_device *device)
static struct d3d12_resource * impl_from_ID3D12Resource(ID3D12Resource *iface)
static bool d3d12_resource_is_texture(const struct d3d12_resource *resource)
static unsigned int d3d12_resource_desc_get_height(const D3D12_RESOURCE_DESC1 *desc, unsigned int miplevel_idx)
@ VKD3D_VIEW_TYPE_SAMPLER
#define VKD3D_DESCRIPTOR_MAGIC_UAV
static unsigned int d3d12_resource_desc_get_depth(const D3D12_RESOURCE_DESC1 *desc, unsigned int miplevel_idx)
#define VKD3D_RESOURCE_PUBLIC_FLAGS
#define VKD3D_DESCRIPTOR_MAGIC_SAMPLER
static struct d3d12_descriptor_heap * d3d12_desc_get_descriptor_heap(const struct d3d12_desc *descriptor)
void VKAPI_CALL vkGetBufferMemoryRequirements2KHR(VkDevice device, const VkBufferMemoryRequirementsInfo2 *pInfo, VkMemoryRequirements2 *pMemoryRequirements)
void VKAPI_CALL vkGetImageMemoryRequirements2KHR(VkDevice device, const VkImageMemoryRequirementsInfo2 *pInfo, VkMemoryRequirements2 *pMemoryRequirements)
VkFlags VkMemoryPropertyFlags
VkResult VKAPI_CALL vkBindImageMemory(VkDevice device, VkImage image, VkDeviceMemory memory, VkDeviceSize memoryOffset)
@ VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL
@ VK_IMAGE_LAYOUT_PREINITIALIZED
@ VK_IMAGE_LAYOUT_UNDEFINED
@ VK_IMAGE_LAYOUT_GENERAL
@ VK_COMMAND_BUFFER_LEVEL_PRIMARY
#define VK_REMAINING_MIP_LEVELS
@ VK_SHARING_MODE_CONCURRENT
@ VK_SHARING_MODE_EXCLUSIVE
@ VK_MEMORY_PROPERTY_HOST_COHERENT_BIT
@ VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT
@ VK_MEMORY_PROPERTY_HOST_CACHED_BIT
@ VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT
VkResult VKAPI_CALL vkCreateBuffer(VkDevice device, const VkBufferCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkBuffer *pBuffer)
VkFlags VkImageAspectFlags
VkResult VKAPI_CALL vkQueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo *pSubmits, VkFence fence)
VkResult VKAPI_CALL vkCreateQueryPool(VkDevice device, const VkQueryPoolCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkQueryPool *pQueryPool)
void VKAPI_CALL vkDestroyImageView(VkDevice device, VkImageView imageView, const VkAllocationCallbacks *pAllocator)
@ VK_IMAGE_VIEW_TYPE_2D_ARRAY
@ VK_IMAGE_VIEW_TYPE_1D_ARRAY
@ VK_IMAGE_VIEW_TYPE_CUBE_ARRAY
@ VK_IMAGE_VIEW_TYPE_CUBE
VkResult VKAPI_CALL vkBeginCommandBuffer(VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo *pBeginInfo)
@ VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT
@ VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR
@ VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT
@ VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT
@ VK_IMAGE_CREATE_SPARSE_BINDING_BIT
@ VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT_EXT
@ VK_IMAGE_TILING_OPTIMAL
@ VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT
void VKAPI_CALL vkGetBufferMemoryRequirements(VkDevice device, VkBuffer buffer, VkMemoryRequirements *pMemoryRequirements)
void VKAPI_CALL vkFreeMemory(VkDevice device, VkDeviceMemory memory, const VkAllocationCallbacks *pAllocator)
VkResult VKAPI_CALL vkInvalidateMappedMemoryRanges(VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange *pMemoryRanges)
void VKAPI_CALL vkGetImageSubresourceLayout(VkDevice device, VkImage image, const VkImageSubresource *pSubresource, VkSubresourceLayout *pLayout)
void VKAPI_CALL vkDestroyBufferView(VkDevice device, VkBufferView bufferView, const VkAllocationCallbacks *pAllocator)
void VKAPI_CALL vkDestroyCommandPool(VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks *pAllocator)
void VKAPI_CALL vkDestroyFence(VkDevice device, VkFence fence, const VkAllocationCallbacks *pAllocator)
void VKAPI_CALL vkDestroyBuffer(VkDevice device, VkBuffer buffer, const VkAllocationCallbacks *pAllocator)
void VKAPI_CALL vkGetImageMemoryRequirements(VkDevice device, VkImage image, VkMemoryRequirements *pMemoryRequirements)
VkResult VKAPI_CALL vkAllocateCommandBuffers(VkDevice device, const VkCommandBufferAllocateInfo *pAllocateInfo, VkCommandBuffer *pCommandBuffers)
@ VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE
@ VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK
@ VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK
VkResult VKAPI_CALL vkEndCommandBuffer(VkCommandBuffer commandBuffer)
@ VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT
@ VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT
@ VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT
@ VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT
@ VK_SAMPLER_MIPMAP_MODE_NEAREST
@ VK_SAMPLER_MIPMAP_MODE_LINEAR
@ VK_IMAGE_ASPECT_COLOR_BIT
@ VK_IMAGE_ASPECT_STENCIL_BIT
@ VK_IMAGE_ASPECT_DEPTH_BIT
@ VK_IMAGE_USAGE_TRANSFER_DST_BIT
@ VK_IMAGE_USAGE_SAMPLED_BIT
@ VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
@ VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT
@ VK_IMAGE_USAGE_TRANSFER_SRC_BIT
@ VK_IMAGE_USAGE_STORAGE_BIT
VkResult VKAPI_CALL vkGetPhysicalDeviceImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkImageFormatProperties *pImageFormatProperties)
@ VK_QUERY_TYPE_PIPELINE_STATISTICS
@ VK_QUERY_TYPE_OCCLUSION
@ VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT
@ VK_QUERY_TYPE_TIMESTAMP
VkResult VKAPI_CALL vkWaitForFences(VkDevice device, uint32_t fenceCount, const VkFence *pFences, VkBool32 waitAll, uint64_t timeout)
VkResult VKAPI_CALL vkAllocateMemory(VkDevice device, const VkMemoryAllocateInfo *pAllocateInfo, const VkAllocationCallbacks *pAllocator, VkDeviceMemory *pMemory)
@ VK_COMPONENT_SWIZZLE_ONE
@ VK_COMPONENT_SWIZZLE_IDENTITY
@ VK_COMPONENT_SWIZZLE_ZERO
void VKAPI_CALL vkCmdClearColorImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue *pColor, uint32_t rangeCount, const VkImageSubresourceRange *pRanges)
void VKAPI_CALL vkDestroySampler(VkDevice device, VkSampler sampler, const VkAllocationCallbacks *pAllocator)
@ VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT
@ VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT
@ VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT
@ VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT
@ VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT
@ VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT
@ VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT
@ VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT
@ VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT
@ VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT
@ VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT
@ VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT
@ VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT
@ VK_BUFFER_USAGE_TRANSFER_DST_BIT
@ VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT
@ VK_BUFFER_USAGE_INDEX_BUFFER_BIT
@ VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT
@ VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT
@ VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT
@ VK_BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT
@ VK_BUFFER_USAGE_VERTEX_BUFFER_BIT
@ VK_BUFFER_USAGE_TRANSFER_SRC_BIT
VkResult VKAPI_CALL vkCreateImageView(VkDevice device, const VkImageViewCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkImageView *pView)
void VKAPI_CALL vkGetImageSparseMemoryRequirements(VkDevice device, VkImage image, uint32_t *pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements *pSparseMemoryRequirements)
VkResult VKAPI_CALL vkMapMemory(VkDevice device, VkDeviceMemory memory, VkDeviceSize offset, VkDeviceSize size, VkMemoryMapFlags flags, void **ppData)
@ VK_ERROR_FORMAT_NOT_SUPPORTED
VkResult VKAPI_CALL vkCreateSampler(VkDevice device, const VkSamplerCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSampler *pSampler)
@ VK_ACCESS_TRANSFER_WRITE_BIT
@ 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
@ VK_BUFFER_CREATE_SPARSE_BINDING_BIT
@ VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT
void VKAPI_CALL vkDestroyDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, const VkAllocationCallbacks *pAllocator)
VkResult VKAPI_CALL vkFlushMappedMemoryRanges(VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange *pMemoryRanges)
VkResult VKAPI_CALL vkBindBufferMemory(VkDevice device, VkBuffer buffer, VkDeviceMemory memory, VkDeviceSize memoryOffset)
@ VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT
@ VK_SAMPLER_ADDRESS_MODE_REPEAT
@ VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE
@ VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE
@ VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER
VkResult VKAPI_CALL vkCreateBufferView(VkDevice device, const VkBufferViewCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkBufferView *pView)
VkResult VKAPI_CALL vkCreateFence(VkDevice device, const VkFenceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkFence *pFence)
void VKAPI_CALL vkCmdFillBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, uint32_t data)
VkResult VKAPI_CALL vkCreateDescriptorPool(VkDevice device, const VkDescriptorPoolCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDescriptorPool *pDescriptorPool)
#define VK_REMAINING_ARRAY_LAYERS
VkResult VKAPI_CALL vkAllocateDescriptorSets(VkDevice device, const VkDescriptorSetAllocateInfo *pAllocateInfo, VkDescriptorSet *pDescriptorSets)
void VKAPI_CALL vkUpdateDescriptorSets(VkDevice device, uint32_t descriptorWriteCount, const VkWriteDescriptorSet *pDescriptorWrites, uint32_t descriptorCopyCount, const VkCopyDescriptorSet *pDescriptorCopies)
@ VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT
@ VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT
@ VK_PIPELINE_STAGE_TRANSFER_BIT
void VKAPI_CALL vkCmdPipelineBarrier(VkCommandBuffer commandBuffer, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, VkDependencyFlags dependencyFlags, uint32_t memoryBarrierCount, const VkMemoryBarrier *pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier *pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier *pImageMemoryBarriers)
VkResult VKAPI_CALL vkCreateCommandPool(VkDevice device, const VkCommandPoolCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkCommandPool *pCommandPool)
void VKAPI_CALL vkUnmapMemory(VkDevice device, VkDeviceMemory memory)
VkResult VKAPI_CALL vkCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkImage *pImage)
void VKAPI_CALL vkGetPhysicalDeviceSparseImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkSampleCountFlagBits samples, VkImageUsageFlags usage, VkImageTiling tiling, uint32_t *pPropertyCount, VkSparseImageFormatProperties *pProperties)
#define VK_QUEUE_FAMILY_IGNORED
void VKAPI_CALL vkDestroyImage(VkDevice device, VkImage image, const VkAllocationCallbacks *pAllocator)
void VKAPI_CALL vkDestroyQueryPool(VkDevice device, VkQueryPool queryPool, const VkAllocationCallbacks *pAllocator)
@ VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2
@ VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2
@ VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS
@ VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO_KHR
@ VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO
@ VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO
@ VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO_EXT
@ VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO
@ VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO
@ VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO
@ VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO
@ VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET
@ VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO
@ VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2
@ VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO
@ VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO
@ VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO
@ VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO
@ VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO
@ VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO
@ VK_STRUCTURE_TYPE_FENCE_CREATE_INFO
@ VK_STRUCTURE_TYPE_SUBMIT_INFO
@ VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE
@ VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO
@ VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
static size_t align(size_t addr, size_t alignment)
#define DXGI_ERROR_NOT_FOUND