45 object->completed_sequence_number = 0;
46 object->submitted_sequence_number = 0;
48 object->vk_family_index = family_index;
49 object->vk_queue_flags = properties->
queueFlags;
52 object->semaphores =
NULL;
53 object->semaphores_size = 0;
54 object->semaphore_count = 0;
60 TRACE(
"Created queue %p for queue family index %u.\n",
object, family_index);
74 for (
i = 0;
i <
queue->semaphore_count; ++
i)
81 if (
queue->old_vk_semaphores[
i])
98 return queue->vk_queue;
120 WARN(
"Failed to wait for queue, vr %d.\n", vr);
124 ERR(
"Failed to acquire queue %p.\n",
queue);
135 unsigned int destroyed_semaphore_count = 0;
137 VkSemaphore vk_semaphore;
142 completed_sequence_number =
queue->completed_sequence_number;
143 queue->completed_sequence_number =
max(sequence_number,
queue->completed_sequence_number);
146 queue, completed_sequence_number,
queue->completed_sequence_number);
148 for (
i = 0;
i <
queue->semaphore_count; ++
i)
150 if (
queue->semaphores[
i].sequence_number >
queue->completed_sequence_number)
153 vk_semaphore =
queue->semaphores[
i].vk_semaphore;
160 queue->old_vk_semaphores[
j] = vk_semaphore;
170 ++destroyed_semaphore_count;
174 queue->semaphore_count -=
i;
178 if (destroyed_semaphore_count)
179 TRACE(
"Destroyed %u Vulkan semaphores.\n", destroyed_semaphore_count);
188 WARN(
"Resetting sequence number for queue %p.\n",
queue);
190 queue->completed_sequence_number = 0;
191 queue->submitted_sequence_number = 1;
193 for (
i = 0;
i <
queue->semaphore_count; ++
i)
194 queue->semaphores[
i].sequence_number =
queue->submitted_sequence_number;
196 return queue->submitted_sequence_number;
211 if ((*vk_semaphore =
queue->old_vk_semaphores[
i]))
221 vk_procs = &
device->vk_procs;
225 semaphore_info.
flags = 0;
228 WARN(
"Failed to create Vulkan semaphore, vr %d.\n", vr);
249 ERR(
"Failed to add GPU fence.\n");
288 ERR(
"Failed to wait for Vulkan timeline semaphore, vr %d.\n", vr);
311 ERR(
"Failed to wait for Vulkan fence, vr %d.\n", vr);
326 size_t old_fences_size, cur_fences_size = 0, cur_fence_count = 0;
346 old_fences_size = cur_fences_size;
347 old_fences = cur_fences;
351 cur_fences = worker->
fences;
355 worker->
fences = old_fences;
359 for (
i = 0;
i < cur_fence_count; ++
i)
372 TRACE(
"worker %p.\n", worker);
404 TRACE(
"worker %p.\n", worker);
436 return &
p->u.descriptor_table;
444 return &
p->u.constant;
493 fence_info.
flags = 0;
496 WARN(
"Failed to create Vulkan fence, vr %d.\n", vr);
509 unsigned int i, semaphore_count;
516 while (i < fence->semaphore_count)
524 if ((
current->u.binary.vk_fence ||
current->u.binary.is_acquired) && !destroy_all)
530 if (
current->u.binary.vk_fence)
531 WARN(
"Destroying potentially pending semaphore.\n");
585 semaphore_value =
current->value;
587 if (semaphore_value ==
value)
594 *completed_value = fence->
value;
626 new_max_pending_value =
max(fence->
semaphores[
i].value, new_max_pending_value);
651 device->blocked_queues[
device->blocked_queue_count++] = command_queue;
655 WARN(
"Failed to add blocked command queue %p to device %p.\n", command_queue,
device);
666 unsigned int i, blocked_queue_count;
669 *flushed_any =
false;
676 blocked_queue_count =
device->blocked_queue_count;
677 memcpy(blocked_queues,
device->blocked_queues, blocked_queue_count *
sizeof(blocked_queues[0]));
678 device->blocked_queue_count = 0;
682 for (
i = 0;
i < blocked_queue_count; ++
i)
725 ERR(
"Failed to add semaphore.\n");
747 bool signal_null_event_cond =
false;
763 signal_null_event_cond =
true;
776 if (signal_null_event_cond)
799 if (
current->u.binary.vk_fence == vk_fence)
855 if (virtual_value <= fence->semaphores[
i].
value)
856 target_timeline_value =
min(target_timeline_value, fence->
semaphores[
i].u.timeline_value);
861 return (target_timeline_value ==
UINT64_MAX) ? 0 : target_timeline_value;
894 FIXME(
"Did not signal a virtual value.\n");
916 ID3D12Fence1_AddRef(iface);
982 TRACE(
"iface %p, guid %s, data_size %p, data %p.\n",
993 TRACE(
"iface %p, guid %s, data_size %u, data %p.\n",
1032 TRACE(
"iface %p.\n", iface);
1035 completed_value = fence->
value;
1037 return completed_value;
1051 if (value <= fence->
value)
1064 WARN(
"Event completion for (%p, %#"PRIx64") is already in the list.\n",
1074 WARN(
"Failed to add event.\n");
1126 TRACE(
"iface %p.\n", iface);
1128 return fence->
flags;
1173 fence->
value = initial_value;
1193 WARN(
"Failed to create timeline semaphore, vr %d.\n", vr);
1195 goto fail_destroy_null_cond;
1206 goto fail_destroy_timeline_semaphore;
1213fail_destroy_timeline_semaphore:
1215fail_destroy_null_cond:
1232 TRACE(
"Created fence %p.\n",
object);
1268 list->is_valid =
false;
1280 begin_info.
flags = 0;
1285 WARN(
"Failed to begin command buffer, vr %d.\n", vr);
1289 list->is_recording =
true;
1290 list->is_valid =
true;
1308 WARN(
"Command allocator is already in use.\n");
1314 command_buffer_info.commandPool =
allocator->vk_command_pool;
1319 &
list->vk_command_buffer))) < 0)
1321 WARN(
"Failed to allocate Vulkan command buffer, vr %d.\n", vr);
1330 1, &
list->vk_command_buffer));
1337 WARN(
"Failed to add command buffer.\n");
1339 1, &
list->vk_command_buffer));
1380 VkDescriptorPool
pool)
1434 VkDevice vk_device =
device->vk_device;
1435 VkDescriptorPool vk_pool;
1438 if (
allocator->free_descriptor_pool_count > 0)
1440 vk_pool =
allocator->free_descriptor_pools[
allocator->free_descriptor_pool_count - 1];
1442 --
allocator->free_descriptor_pool_count;
1448 pool_desc.
flags = 0;
1454 ERR(
"Failed to create descriptor pool, vr %d.\n", vr);
1461 ERR(
"Failed to add descriptor pool.\n");
1471 unsigned int variable_binding_size,
bool unbounded)
1477 VkDevice vk_device =
device->vk_device;
1478 VkDescriptorSet vk_descriptor_set;
1488 set_desc.descriptorPool =
allocator->vk_descriptor_pool;
1497 set_size.pDescriptorCounts = &variable_binding_size;
1500 return vk_descriptor_set;
1507 ERR(
"Failed to allocate descriptor set, vr %d.\n", vr);
1511 set_desc.descriptorPool =
allocator->vk_descriptor_pool;
1514 FIXME(
"Failed to allocate descriptor set from a new pool, vr %d.\n", vr);
1518 return vk_descriptor_set;
1538 bool keep_reusable_resources)
1546 if (keep_reusable_resources)
1551 sizeof(*
allocator->free_descriptor_pools)))
1553 for (
i = 0,
j =
allocator->free_descriptor_pool_count; i < allocator->descriptor_pool_count; ++
i, ++
j)
1564 for (
i = 0;
i <
allocator->free_descriptor_pool_count; ++
i)
1568 allocator->free_descriptor_pool_count = 0;
1625 ID3D12CommandAllocator_AddRef(iface);
1741 TRACE(
"iface %p.\n", iface);
1745 if (
list->is_recording)
1747 WARN(
"A command list using this allocator is in the recording state.\n");
1751 TRACE(
"Resetting command list %p.\n",
list);
1768 WARN(
"Resetting command pool failed, vr %d.\n", vr);
1806 return device->direct_queue;
1808 return device->compute_queue;
1810 return device->copy_queue;
1812 FIXME(
"Unhandled command list type %#x.\n",
type);
1843 command_pool_info.
flags = 0;
1849 WARN(
"Failed to create Vulkan command pool, vr %d.\n", vr);
1857 allocator->free_descriptor_pools_size = 0;
1858 allocator->free_descriptor_pool_count = 0;
1916 TRACE(
"Created command allocator %p.\n",
object);
1965 if (
list->xfb_enabled)
1968 list->so_counter_buffers,
list->so_counter_buffer_offsets));
1971 if (
list->current_render_pass)
1976 if (
list->xfb_enabled)
1987 1, &vk_barrier, 0,
NULL, 0,
NULL));
1989 list->xfb_enabled =
false;
2001 if (
state &&
state->uav_counters.binding_count)
2006 vkd3d_array_reserve((
void **)&bindings->vk_uav_counter_views, &bindings->vk_uav_counter_views_size,
2007 state->uav_counters.binding_count,
sizeof(*bindings->vk_uav_counter_views));
2008 memset(bindings->vk_uav_counter_views, 0,
2009 state->uav_counters.binding_count *
sizeof(*bindings->vk_uav_counter_views));
2010 bindings->uav_counters_dirty =
true;
2041 if (
device->vk_info.geometry_shaders)
2043 if (
device->vk_info.tessellation_shaders)
2059 if (is_swapchain_image)
2063 resource, vk_queue_flags, vk_info, access_mask, stage_flags, image_layout,
device);
2089 *stage_flags = queue_shader_stages;
2181 | queue_shader_stages;
2182 state &= ~D3D12_RESOURCE_STATE_VERTEX_AND_CONSTANT_BUFFER;
2189 state &= ~D3D12_RESOURCE_STATE_INDEX_BUFFER;
2197 state &= ~D3D12_RESOURCE_STATE_DEPTH_READ;
2203 *stage_flags |= (queue_shader_stages & ~VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT);
2204 state &= ~D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE;
2210 state &= ~D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE;
2222 state &= ~D3D12_RESOURCE_STATE_INDIRECT_ARGUMENT;
2234 WARN(
"Invalid resource state %#x.\n",
state);
2269 barrier.image =
resource->u.vk_image;
2276 TRACE(
"Initial state %#x transition for resource %p (old layout %#x, new layout %#x).\n",
2291 resource->flags &= ~VKD3D_RESOURCE_INITIAL_STATE_TRANSITION;
2296 REFIID iid,
void **
object)
2300 if (
IsEqualGUID(iid, &IID_ID3D12GraphicsCommandList6)
2301 ||
IsEqualGUID(iid, &IID_ID3D12GraphicsCommandList5)
2302 ||
IsEqualGUID(iid, &IID_ID3D12GraphicsCommandList4)
2303 ||
IsEqualGUID(iid, &IID_ID3D12GraphicsCommandList3)
2304 ||
IsEqualGUID(iid, &IID_ID3D12GraphicsCommandList2)
2305 ||
IsEqualGUID(iid, &IID_ID3D12GraphicsCommandList1)
2306 ||
IsEqualGUID(iid, &IID_ID3D12GraphicsCommandList)
2312 ID3D12GraphicsCommandList6_AddRef(iface);
2352 if (
list->allocator)
2419 TRACE(
"iface %p.\n", iface);
2430 TRACE(
"iface %p.\n", iface);
2432 if (!
list->is_recording)
2434 WARN(
"Command list is not in the recording state.\n");
2438 vk_procs = &
list->device->vk_procs;
2441 if (
list->is_predicated)
2446 WARN(
"Failed to end command buffer, vr %d.\n", vr);
2450 if (
list->allocator)
2456 list->is_recording =
false;
2457 list->has_depth_bounds =
false;
2459 if (!
list->is_valid)
2461 WARN(
"Error occurred during command list recording.\n");
2482 list->fb_height = 0;
2483 list->fb_layer_count = 0;
2485 list->xfb_enabled =
false;
2486 list->has_depth_bounds =
false;
2487 list->is_predicated =
false;
2496 memset(
list->pipeline_bindings, 0,
sizeof(
list->pipeline_bindings));
2502 memset(
list->so_counter_buffers, 0,
sizeof(
list->so_counter_buffers));
2503 memset(
list->so_counter_buffer_offsets, 0,
sizeof(
list->so_counter_buffer_offsets));
2505 list->descriptor_heap_count = 0;
2507 ID3D12GraphicsCommandList6_SetPipelineState(iface, initial_pipeline_state);
2517 TRACE(
"iface %p, allocator %p, initial_pipeline_state %p.\n",
2518 iface,
allocator, initial_pipeline_state);
2520 if (!allocator_impl)
2522 WARN(
"Command allocator is NULL.\n");
2526 if (
list->is_recording)
2528 WARN(
"Command list is in the recording state.\n");
2534 list->allocator = allocator_impl;
2544 FIXME(
"iface %p, pipeline_state %p stub!\n", iface, pipeline_state);
2552 graphics = &
list->state->u.graphics;
2568 *layer_count =
list->fb_layer_count;
2572 *
width =
device->vk_info.device_limits.maxFramebufferWidth;
2573 *
height =
device->vk_info.device_limits.maxFramebufferHeight;
2586 VkFramebuffer vk_framebuffer;
2587 unsigned int view_count;
2594 graphics = &
list->state->u.graphics;
2596 for (
i = 0, view_count = 0;
i < graphics->
rt_count; ++
i)
2601 WARN(
"Expected NULL RTV for attachment %u.\n",
i);
2607 FIXME(
"Invalid RTV for attachment %u.\n",
i);
2611 views[view_count++] =
list->rtvs[
i];
2616 if (!(views[view_count++] =
list->dsv))
2618 FIXME(
"Invalid DSV.\n");
2626 fb_desc.renderPass =
list->pso_render_pass;
2632 WARN(
"Failed to create Vulkan framebuffer, vr %d.\n", vr);
2638 WARN(
"Failed to add framebuffer.\n");
2643 list->current_framebuffer = vk_framebuffer;
2659 WARN(
"Pipeline state %p is not a compute pipeline.\n",
list->state);
2664 list->current_pipeline =
list->state->u.compute.vk_pipeline;
2672 VkRenderPass vk_render_pass;
2673 VkPipeline vk_pipeline;
2682 WARN(
"Pipeline state %p is not a graphics pipeline.\n",
list->state);
2687 list->primitive_topology,
list->strides,
list->dsv_format, &vk_render_pass)))
2692 if (
list->pso_render_pass != vk_render_pass)
2694 list->pso_render_pass = vk_render_pass;
2700 list->current_pipeline = vk_pipeline;
2709 unsigned int variable_binding_size, unbounded_offset, table_index, heap_size,
i;
2713 VkDescriptorSet vk_descriptor_set;
2731 for (
i = root_signature->
main_set; i < root_signature->vk_set_count; ++
i)
2736 variable_binding_size = 0;
2744 if (heap_size < unbounded_offset)
2745 WARN(
"Descriptor heap size %u is less than the offset %u of an unbounded range in table %u, "
2746 "vk set %u.\n", heap_size, unbounded_offset, table_index,
i);
2748 variable_binding_size = heap_size - unbounded_offset;
2756 bindings->
in_use =
false;
2765 unsigned int index,
bool use_array)
2773 if (!
u.header ||
u.header->magic != descriptor_range_magic)
2776 vk_descriptor_type =
u.header->vk_descriptor_type;
2780 vk_descriptor_write->dstSet = vk_descriptor_sets[
set];
2781 vk_descriptor_write->
dstBinding = use_array ? vk_binding : vk_binding +
index;
2789 switch (
u.header->magic)
2792 vk_descriptor_write->
pBufferInfo = &
u.cb_desc->vk_cbv_info;
2810 vk_descriptor_write->dstSet = vk_descriptor_sets[
set + 1];
2815 vk_descriptor_write->
dstBinding += use_array ? 1 :
range->descriptor_count;
2819 vk_image_info->imageView =
u.view->v.u.vk_image_view;
2823 vk_descriptor_write->
pImageInfo = vk_image_info;
2827 vk_image_info->sampler =
u.view->v.u.vk_sampler;
2831 vk_descriptor_write->
pImageInfo = vk_image_info;
2835 ERR(
"Invalid descriptor %#x.\n",
u.header->magic);
2853 VkDevice vk_device =
list->device->vk_device;
2856 unsigned int write_count = 0;
2862 current_image_info = image_infos;
2873 descriptor_count =
range->descriptor_count;
2878 if (descriptor_count >
range->vk_binding_count)
2880 ERR(
"Heap descriptor count %u exceeds maximum Vulkan count %u. Reducing to the Vulkan maximum.\n",
2881 descriptor_count,
range->vk_binding_count);
2882 descriptor_count =
range->vk_binding_count;
2888 unsigned int register_idx =
range->base_register_idx +
j;
2890 VkBufferView vk_counter_view;
2898 for (
k = 0;
k <
state->uav_counters.binding_count; ++
k)
2900 if (
state->uav_counters.bindings[
k].register_space ==
range->register_space
2901 &&
state->uav_counters.bindings[
k].register_index == register_idx)
2920 ++current_descriptor_write;
2921 ++current_image_info;
2928 current_image_info = image_infos;
2962 vk_descriptor_write->dstSet = vk_descriptor_set;
2967 vk_descriptor_write->
pBufferInfo = vk_buffer_info;
2985 unsigned int i, descriptor_count = 0;
2986 VkBufferView *vk_buffer_view;
3001 vk_buffer_view =
NULL;
3002 vk_buffer_info = &buffer_infos[descriptor_count];
3003 vk_buffer_info->buffer = push_descriptor->
u.
cbv.vk_buffer;
3004 vk_buffer_info->offset = push_descriptor->
u.
cbv.offset;
3010 vk_buffer_info =
NULL;
3014 root_parameter, bindings->
descriptor_sets[0], vk_buffer_view, vk_buffer_info))
3030 VkDevice vk_device =
list->device->vk_device;
3032 VkDescriptorSet vk_descriptor_set;
3033 unsigned int uav_counter_count;
3039 uav_counter_count =
state->uav_counters.binding_count;
3040 if (!(vk_descriptor_writes =
vkd3d_calloc(uav_counter_count,
sizeof(*vk_descriptor_writes))))
3043 list->allocator,
state->uav_counters.vk_set_layout, 0,
false)))
3046 for (
i = 0;
i < uav_counter_count; ++
i)
3055 vk_descriptor_writes[
i].dstSet = vk_descriptor_set;
3068 state->uav_counters.vk_pipeline_layout,
state->uav_counters.set_index, 1, &vk_descriptor_set, 0,
NULL));
3098 WARN(
"Descriptor table %u is not set.\n",
i);
3135 if (*cbv_srv_uav_heap)
3137 if (
heap == *cbv_srv_uav_heap)
3141 WARN(
"List %p uses descriptors from more than one CBV/SRV/UAV heap.\n",
list);
3143 *cbv_srv_uav_heap =
heap;
3149 if (
heap == *sampler_heap)
3151 WARN(
"List %p uses descriptors from more than one sampler heap.\n",
list);
3153 *sampler_heap =
heap;
3173 cbv_srv_uav_heap, sampler_heap);
3188 if (heap_array[
i] ==
query)
3198 for (
i = 0;
i <
list->descriptor_heap_count; ++
i)
3208 if (!
list->device->use_vk_heaps)
3216 FIXME(
"Flushing descriptor updates while list %p is not closed.\n",
list);
3222 list->descriptor_heaps[
list->descriptor_heap_count++] =
heap;
3254 VkDescriptorSet vk_descriptor_set =
heap->vk_descriptor_sets[
set].vk_set;
3257 if (!vk_descriptor_set || !
list->device->vk_descriptor_heap_layouts[
set].vk_set_layout)
3300 if (
list->device->use_vk_heaps)
3323 VkRenderPass vk_render_pass;
3335 vk_render_pass =
list->pso_render_pass;
3340 begin_desc.renderPass = vk_render_pass;
3341 begin_desc.framebuffer =
list->current_framebuffer;
3350 list->current_render_pass = vk_render_pass;
3352 graphics = &
list->state->u.graphics;
3356 list->so_counter_buffers,
list->so_counter_buffer_offsets));
3358 list->xfb_enabled =
true;
3363 list->has_depth_bounds =
true;
3380 FIXME_ONCE(
"Strip cut value 0xffff is not supported with index buffer format %#x.\n",
3381 list->index_buffer_format);
3388 FIXME_ONCE(
"Strip cut value 0xffffffff is not supported with index buffer format %#x.\n",
3389 list->index_buffer_format);
3399 UINT vertex_count_per_instance,
UINT instance_count,
UINT start_vertex_location,
3400 UINT start_instance_location)
3405 TRACE(
"iface %p, vertex_count_per_instance %u, instance_count %u, "
3406 "start_vertex_location %u, start_instance_location %u.\n",
3407 iface, vertex_count_per_instance, instance_count,
3408 start_vertex_location, start_instance_location);
3410 vk_procs = &
list->device->vk_procs;
3414 WARN(
"Failed to begin render pass, ignoring draw call.\n");
3419 instance_count, start_vertex_location, start_instance_location));
3423 UINT index_count_per_instance,
UINT instance_count,
UINT start_vertex_location,
3424 INT base_vertex_location,
UINT start_instance_location)
3429 TRACE(
"iface %p, index_count_per_instance %u, instance_count %u, start_vertex_location %u, "
3430 "base_vertex_location %d, start_instance_location %u.\n",
3431 iface, index_count_per_instance, instance_count, start_vertex_location,
3432 base_vertex_location, start_instance_location);
3436 WARN(
"Failed to begin render pass, ignoring draw call.\n");
3440 vk_procs = &
list->device->vk_procs;
3445 instance_count, start_vertex_location, base_vertex_location, start_instance_location));
3454 TRACE(
"iface %p, x %u, y %u, z %u.\n", iface,
x,
y,
z);
3458 WARN(
"Failed to update compute state, ignoring dispatch.\n");
3462 vk_procs = &
list->device->vk_procs;
3475 TRACE(
"iface %p, dst_resource %p, dst_offset %#"PRIx64", src_resource %p, "
3477 iface,
dst, dst_offset,
src, src_offset, byte_count);
3479 vk_procs = &
list->device->vk_procs;
3491 buffer_copy.srcOffset = src_offset;
3492 buffer_copy.dstOffset = dst_offset;
3493 buffer_copy.size = byte_count;
3500 const struct vkd3d_format *
format,
unsigned int sub_resource_idx,
unsigned int miplevel_count)
3503 subresource->
mipLevel = sub_resource_idx % miplevel_count;
3519 const D3D12_BOX *src_box,
unsigned int dst_x,
unsigned int dst_y,
unsigned int dst_z)
3533 copy->imageOffset.x = dst_x;
3534 copy->imageOffset.y = dst_y;
3535 copy->imageOffset.z = dst_z;
3538 copy->imageSubresource.mipLevel);
3539 copy->imageExtent.width -=
copy->imageOffset.x;
3540 copy->imageExtent.height -=
copy->imageOffset.y;
3541 copy->imageExtent.depth -=
copy->imageOffset.z;
3560 const D3D12_BOX *src_box,
unsigned int dst_x,
unsigned int dst_y,
unsigned int dst_z)
3571 copy->imageOffset.x = src_box ? src_box->
left : 0;
3572 copy->imageOffset.y = src_box ? src_box->
top : 0;
3573 copy->imageOffset.z = src_box ? src_box->
front : 0;
3582 unsigned int miplevel =
copy->imageSubresource.mipLevel;
3588 unsigned int src_sub_resource_idx,
unsigned int dst_sub_resource_idx,
3591 const D3D12_BOX *src_box,
unsigned int dst_x,
unsigned int dst_y,
unsigned int dst_z)
3594 src_format, src_sub_resource_idx, src_desc->
MipLevels);
3625 memset(&heap_properties, 0,
sizeof(heap_properties));
3641 &buffer_desc, &
buffer->vk_buffer)))
3652 ERR(
"Failed to add transfer buffer.\n");
3667 struct d3d12_resource *dst_resource,
unsigned int dst_sub_resource_idx,
3669 unsigned int src_sub_resource_idx,
const struct vkd3d_format *src_format,
unsigned int layer_count)
3674 unsigned int dst_miplevel_idx, src_miplevel_idx;
3681 WARN(
"Copying incompatible texture formats %#x, %#x -> %#x, %#x.\n",
3691 buffer_image_copy.bufferOffset = 0;
3692 buffer_image_copy.bufferRowLength = 0;
3693 buffer_image_copy.bufferImageHeight = 0;
3695 src_format, src_sub_resource_idx, src_desc->
MipLevels);
3696 buffer_image_copy.imageSubresource.layerCount = layer_count;
3697 src_miplevel_idx = buffer_image_copy.imageSubresource.mipLevel;
3698 buffer_image_copy.imageOffset.x = 0;
3699 buffer_image_copy.imageOffset.y = 0;
3700 buffer_image_copy.imageOffset.z = 0;
3704 buffer_image_copy.imageExtent.height * buffer_image_copy.imageExtent.depth * layer_count;
3713 transfer_buffer.
vk_buffer, 1, &buffer_image_copy));
3721 vk_barrier.buffer = transfer_buffer.
vk_buffer;
3722 vk_barrier.offset = 0;
3726 0,
NULL, 1, &vk_barrier, 0,
NULL));
3730 buffer_image_copy.imageSubresource.layerCount = layer_count;
3731 dst_miplevel_idx = buffer_image_copy.imageSubresource.mipLevel;
3747 return box->right >
box->left
3748 &&
box->bottom >
box->top
3749 &&
box->back >
box->front;
3763 TRACE(
"iface %p, dst %p, dst_x %u, dst_y %u, dst_z %u, src %p, src_box %p.\n",
3764 iface,
dst, dst_x, dst_y, dst_z,
src, src_box);
3772 vk_procs = &
list->device->vk_procs;
3789 &src_resource->
desc,
dst->u.PlacedFootprint.Footprint.
Format)))
3791 WARN(
"Invalid format %#x.\n",
dst->u.PlacedFootprint.Footprint.Format);
3803 FIXME(
"Depth-stencil format %#x not fully supported yet.\n",
dst_format->dxgi_format);
3806 src->u.SubresourceIndex, &src_resource->
desc,
dst_format, src_box, dst_x, dst_y, dst_z);
3809 dst_resource->
u.
vk_buffer, 1, &buffer_image_copy));
3818 &dst_resource->
desc,
src->u.PlacedFootprint.Footprint.
Format)))
3820 WARN(
"Invalid format %#x.\n",
src->u.PlacedFootprint.Footprint.Format);
3832 FIXME(
"Depth-stencil format %#x not fully supported yet.\n", src_format->
dxgi_format);
3835 dst->u.SubresourceIndex, &dst_resource->
desc, src_format, src_box, dst_x, dst_y, dst_z);
3847 src_format = src_resource->
format;
3851 FIXME(
"Depth-stencil format %#x not fully supported yet.\n",
dst_format->dxgi_format);
3854 FIXME(
"Depth-stencil format %#x not fully supported yet.\n", src_format->
dxgi_format);
3860 src_resource,
src->
u.SubresourceIndex, src_format, 1);
3866 src_box, dst_x, dst_y, dst_z);
3873 FIXME(
"Copy type %#x -> %#x not implemented.\n",
src->Type,
dst->Type);
3886 unsigned int layer_count;
3889 TRACE(
"iface %p, dst_resource %p, src_resource %p.\n", iface,
dst,
src);
3891 vk_procs = &
list->device->vk_procs;
3906 vk_buffer_copy.srcOffset = 0;
3907 vk_buffer_copy.dstOffset = 0;
3908 vk_buffer_copy.size = dst_resource->
desc.
Width;
3916 src_format = src_resource->
format;
3929 src_resource,
i, src_format, layer_count);
3952 FIXME(
"iface %p, tiled_resource %p, tile_region_start_coordinate %p, tile_region_size %p, "
3953 "buffer %p, buffer_offset %#"PRIx64", flags %#x stub!\n",
3954 iface, tiled_resource, tile_region_start_coordinate, tile_region_size,
3969 TRACE(
"iface %p, dst_resource %p, dst_sub_resource_idx %u, src_resource %p, src_sub_resource_idx %u, "
3970 "format %#x.\n", iface,
dst, dst_sub_resource_idx,
src, src_sub_resource_idx,
format);
3987 src_format = src_resource->
format;
3998 FIXME(
"Not implemented for typeless resources.\n");
4007 FIXME(
"Resolve of depth/stencil images is not implemented yet.\n");
4012 src_format, src_sub_resource_idx, src_resource->
desc.
MipLevels);
4030 TRACE(
"iface %p, topology %#x.\n", iface, topology);
4032 if (
list->primitive_topology == topology)
4035 list->primitive_topology = topology;
4047 TRACE(
"iface %p, viewport_count %u, viewports %p.\n", iface, viewport_count, viewports);
4049 if (viewport_count >
ARRAY_SIZE(vk_viewports))
4051 FIXME(
"Viewport count %u > D3D12_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE.\n", viewport_count);
4055 for (
i = 0;
i < viewport_count; ++
i)
4064 if (vk_viewports[
i].
width <= 0.0f)
4067 FIXME_ONCE(
"Setting invalid viewport %u to zero height.\n",
i);
4068 vk_viewports[
i].
width = 1.0f;
4069 vk_viewports[
i].
height = 0.0f;
4073 vk_procs = &
list->device->vk_procs;
4085 TRACE(
"iface %p, rect_count %u, rects %p.\n", iface, rect_count, rects);
4089 FIXME(
"Rect count %u > D3D12_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE.\n", rect_count);
4093 for (
i = 0;
i < rect_count; ++
i)
4101 vk_procs = &
list->device->vk_procs;
4106 const FLOAT blend_factor[4])
4111 TRACE(
"iface %p, blend_factor %p.\n", iface, blend_factor);
4113 vk_procs = &
list->device->vk_procs;
4123 TRACE(
"iface %p, stencil_ref %u.\n", iface, stencil_ref);
4125 vk_procs = &
list->device->vk_procs;
4135 TRACE(
"iface %p, pipeline_state %p.\n", iface, pipeline_state);
4149 return first_state == second_state
4155 unsigned int i,
unsigned int barrier_count,
unsigned int sub_resource_count)
4160 for (
j =
i + 1;
j < barrier_count; ++
j)
4167 if (barriers[
j].
u.Transition.Subresource == sub_resource_idx)
4188 bool have_aliasing_barriers =
false, have_split_barriers =
false;
4191 bool *multiplanar_handled =
NULL;
4194 TRACE(
"iface %p, barrier_count %u, barriers %p.\n", iface, barrier_count, barriers);
4196 vk_procs = &
list->device->vk_procs;
4197 vk_info = &
list->device->vk_info;
4201 for (
i = 0;
i < barrier_count; ++
i)
4210 have_split_barriers = have_split_barriers
4221 unsigned int state_before, state_after, stencil_state_before = 0, stencil_state_after = 0;
4227 "Invalid StateBefore %#x (barrier %u).", transition->
StateBefore,
i);
4233 "Invalid StateAfter %#x (barrier %u).", transition->
StateAfter,
i);
4243 if (multiplanar_handled && multiplanar_handled[
i])
4256 if (
j && (multiplanar_handled || (multiplanar_handled =
vkd3d_calloc(barrier_count,
sizeof(*multiplanar_handled)))))
4258 multiplanar_handled[
j] =
true;
4259 if (sub_resource_idx >= sub_resource_count)
4261 sub_resource_idx -= sub_resource_count;
4266 stencil_state_after = transition->
StateAfter;
4275 else if (sub_resource_idx >= sub_resource_count)
4277 FIXME_ONCE(
"Unhandled sub-resource idx %u.\n", sub_resource_idx);
4283 resource,
list->vk_queue_flags, vk_info, &src_access_mask,
4284 &src_stage_mask, &layout_before,
list->device))
4286 FIXME(
"Unhandled state %#x.\n", state_before);
4290 resource,
list->vk_queue_flags, vk_info, &dst_access_mask,
4291 &dst_stage_mask, &layout_after,
list->device))
4293 FIXME(
"Unhandled state %#x.\n", state_after);
4297 TRACE(
"Transition barrier (resource %p, subresource %#x, before %#x, after %#x).\n",
4312 &stage_mask, &image_layout,
list->device);
4313 src_access_mask = dst_access_mask = access_mask;
4314 src_stage_mask = dst_stage_mask = stage_mask;
4315 layout_before = layout_after = image_layout;
4322 have_aliasing_barriers =
true;
4325 WARN(
"Invalid barrier type %#x.\n",
current->Type);
4342 1, &vk_barrier, 0,
NULL, 0,
NULL));
4354 vk_barrier.buffer =
resource->u.vk_buffer;
4355 vk_barrier.offset = 0;
4359 0,
NULL, 1, &vk_barrier, 0,
NULL));
4373 vk_barrier.image =
resource->u.vk_image;
4388 FIXME_ONCE(
"Unhandled sub-resource idx %u.\n", sub_resource_idx);
4399 0,
NULL, 0,
NULL, 1, &vk_barrier));
4405 if (have_aliasing_barriers)
4406 FIXME_ONCE(
"Aliasing barriers not implemented yet.\n");
4409 if (have_split_barriers)
4410 WARN(
"Issuing split barrier(s) on D3D12_RESOURCE_BARRIER_FLAG_END_ONLY.\n");
4416 FIXME(
"iface %p, command_list %p stub!\n", iface, command_list);
4422 TRACE(
"iface %p, heap_count %u, heaps %p.\n", iface, heap_count, heaps);
4450 TRACE(
"iface %p, root_signature %p.\n", iface, root_signature);
4461 TRACE(
"iface %p, root_signature %p.\n", iface, root_signature);
4488 WARN(
"Descriptor heap %p is not shader visible.\n", descriptor_heap);
4503 TRACE(
"iface %p, root_parameter_index %u, base_descriptor %s.\n",
4507 root_parameter_index, base_descriptor);
4515 TRACE(
"iface %p, root_parameter_index %u, base_descriptor %s.\n",
4519 root_parameter_index, base_descriptor);
4540 TRACE(
"iface %p, root_parameter_index %u, data 0x%08x, dst_offset %u.\n",
4541 iface, root_parameter_index,
data, dst_offset);
4544 root_parameter_index, dst_offset, 1, &
data);
4552 TRACE(
"iface %p, root_parameter_index %u, data 0x%08x, dst_offset %u.\n",
4553 iface, root_parameter_index,
data, dst_offset);
4556 root_parameter_index, dst_offset, 1, &
data);
4564 TRACE(
"iface %p, root_parameter_index %u, constant_count %u, data %p, dst_offset %u.\n",
4576 TRACE(
"iface %p, root_parameter_index %u, constant_count %u, data %p, dst_offset %u.\n",
4601 buffer_info.buffer =
resource->u.vk_buffer;
4603 buffer_info.range =
resource->desc.Width - buffer_info.offset;
4608 buffer_info.buffer =
list->device->null_resources.vk_buffer;
4609 buffer_info.offset = 0;
4640 TRACE(
"iface %p, root_parameter_index %u, address %#"PRIx64".\n",
4641 iface, root_parameter_index,
address);
4651 TRACE(
"iface %p, root_parameter_index %u, address %#"PRIx64".\n",
4652 iface, root_parameter_index,
address);
4666 VkDevice vk_device =
list->device->vk_device;
4667 VkBufferView vk_buffer_view;
4675 ERR(
"Failed to create buffer view.\n");
4681 ERR(
"Failed to add buffer view.\n");
4712 TRACE(
"iface %p, root_parameter_index %u, address %#"PRIx64".\n",
4713 iface, root_parameter_index,
address);
4716 root_parameter_index,
address);
4724 TRACE(
"iface %p, root_parameter_index %u, address %#"PRIx64".\n",
4725 iface, root_parameter_index,
address);
4728 root_parameter_index,
address);
4736 TRACE(
"iface %p, root_parameter_index %u, address %#"PRIx64".\n",
4737 iface, root_parameter_index,
address);
4740 root_parameter_index,
address);
4748 TRACE(
"iface %p, root_parameter_index %u, address %#"PRIx64".\n",
4749 iface, root_parameter_index,
address);
4752 root_parameter_index,
address);
4763 TRACE(
"iface %p, view %p.\n", iface,
view);
4767 WARN(
"Ignoring NULL index buffer view.\n");
4770 if (!
view->BufferLocation)
4772 WARN(
"Ignoring index buffer location 0.\n");
4776 vk_procs = &
list->device->vk_procs;
4778 switch (
view->Format)
4787 WARN(
"Invalid index format %#x.\n",
view->Format);
4791 list->index_buffer_format =
view->Format;
4795 view->BufferLocation -
resource->gpu_address, index_type));
4808 unsigned int i,
stride, max_view_count;
4812 TRACE(
"iface %p, start_slot %u, view_count %u, views %p.\n", iface, start_slot, view_count, views);
4814 vk_procs = &
device->vk_procs;
4815 null_resources = &
device->null_resources;
4816 gpu_va_allocator = &
device->gpu_va_allocator;
4820 WARN(
"Invalid start slot %u / view count %u.\n", start_slot, view_count);
4824 max_view_count =
device->vk_info.device_limits.maxVertexInputBindings;
4825 if (start_slot < max_view_count)
4826 max_view_count -= start_slot;
4835 if (view_count > max_view_count)
4837 for (
i = max_view_count;
i < view_count; ++
i)
4839 if (views && views[
i].BufferLocation)
4840 WARN(
"Ignoring unsupported vertex buffer slot %u.\n", start_slot +
i);
4842 view_count = max_view_count;
4845 for (
i = 0;
i < view_count; ++
i)
4847 if (views && views[
i].BufferLocation)
4884 TRACE(
"iface %p, start_slot %u, view_count %u, views %p.\n", iface, start_slot, view_count, views);
4888 if (!
list->device->vk_info.EXT_transform_feedback)
4890 FIXME(
"Transform feedback is not supported by Vulkan implementation.\n");
4896 WARN(
"Invalid start slot %u / view count %u.\n", start_slot, view_count);
4900 vk_procs = &
list->device->vk_procs;
4901 gpu_va_allocator = &
list->device->gpu_va_allocator;
4905 for (
i = 0;
i < view_count; ++
i)
4907 if (views[
i].BufferLocation && views[
i].SizeInBytes)
4915 list->so_counter_buffers[start_slot +
i] =
resource->u.vk_buffer;
4924 first = start_slot +
i + 1;
4927 list->so_counter_buffer_offsets[start_slot +
i] = 0;
4929 WARN(
"Trying to unbind transform feedback buffer %u. Ignoring.\n", start_slot +
i);
4948 TRACE(
"iface %p, render_target_descriptor_count %u, render_target_descriptors %p, "
4949 "single_descriptor_handle %#x, depth_stencil_descriptor %p.\n",
4950 iface, render_target_descriptor_count, render_target_descriptors,
4951 single_descriptor_handle, depth_stencil_descriptor);
4955 WARN(
"Descriptor count %u > %zu, ignoring extra descriptors.\n",
4961 list->fb_height = 0;
4962 list->fb_layer_count = 0;
4963 for (
i = 0;
i < render_target_descriptor_count; ++
i)
4965 if (single_descriptor_handle)
4975 if (!rtv_desc || !rtv_desc->
resource)
4977 WARN(
"RTV descriptor %u is not initialized.\n",
i);
4988 WARN(
"Failed to add view.\n");
4991 list->rtvs[
i] =
view->v.u.vk_image_view;
4997 prev_dsv_format =
list->dsv_format;
5000 if (depth_stencil_descriptor)
5011 WARN(
"Failed to add view.\n");
5015 list->dsv =
view->v.u.vk_image_view;
5019 list->dsv_format = dsv_desc->
format->vk_format;
5023 WARN(
"DSV descriptor is not initialized.\n");
5045 VkFramebuffer vk_framebuffer;
5046 VkRenderPass vk_render_pass;
5064 sub_pass_desc.
flags = 0;
5077 pass_desc.
flags = 0;
5086 WARN(
"Failed to create Vulkan render pass, vr %d.\n", vr);
5092 WARN(
"Failed to add render pass.\n");
5099 WARN(
"Failed to add view.\n");
5105 fb_desc.renderPass = vk_render_pass;
5110 fb_desc.
layers = layer_count;
5113 WARN(
"Failed to create Vulkan framebuffer, vr %d.\n", vr);
5119 WARN(
"Failed to add framebuffer.\n");
5126 begin_desc.renderPass = vk_render_pass;
5127 begin_desc.framebuffer = vk_framebuffer;
5131 for (
i = 0;
i < rect_count; ++
i)
5152 TRACE(
"iface %p, dsv %s, flags %#x, depth %.8e, stencil 0x%02x, rect_count %u, rects %p.\n",
5157 attachment_desc.
flags = 0;
5188 &clear_value, rect_count, rects);
5200 TRACE(
"iface %p, rtv %s, color %p, rect_count %u, rects %p.\n",
5205 attachment_desc.
flags = 0;
5220 clear_value.color.uint32[0] =
max(0,
color[0]);
5221 clear_value.color.uint32[1] =
max(0,
color[1]);
5222 clear_value.color.uint32[2] =
max(0,
color[2]);
5223 clear_value.color.uint32[3] =
max(0,
color[3]);
5227 clear_value.color.int32[0] =
color[0];
5228 clear_value.color.int32[1] =
color[1];
5229 clear_value.color.int32[2] =
color[2];
5230 clear_value.color.int32[3] =
color[3];
5234 clear_value.color.float32[0] =
color[0];
5235 clear_value.color.float32[1] =
color[1];
5236 clear_value.color.float32[2] =
color[2];
5237 clear_value.color.float32[3] =
color[3];
5242 &clear_value, rect_count, rects);
5259 info->vk_set_layout =
state->vk_set_layout_buffer;
5260 info->vk_pipeline_layout =
state->vk_pipeline_layout_buffer;
5271 info->vk_set_layout =
state->vk_set_layout_image;
5272 info->vk_pipeline_layout =
state->vk_pipeline_layout_image;
5274 switch (image_view_type)
5302 ERR(
"Unhandled view type %#x.\n", image_view_type);
5311 unsigned int rect_count,
const D3D12_RECT *rects)
5315 unsigned int i, miplevel_idx, layer_count;
5319 uint32_t count_x, count_y, count_z;
5332 WARN(
"Failed to add view.\n");
5335 clear_args.
colour = *clear_colour;
5358 image_info.imageView =
view->u.vk_image_view;
5369 :
view->info.texture.layer_count;
5371 view->info.texture.vk_view_type,
view->format->
type, &pipeline);
5377 ERR(
"Failed to allocate descriptor set.\n");
5399 for (
i = 0;
i < rect_count; ++
i)
5435 while (curr_rect.
right > curr_rect.
left);
5446 | ((colour->
uint32[1] & 0x7ff) << 11)
5447 | ((colour->
uint32[2] & 0x3ff) << 22);
5452 | ((colour->
uint32[1] & 0x3f) << 5)
5453 | ((colour->
uint32[0] & 0x1f) << 11);
5458 | ((colour->
uint32[1] & 0x1f) << 5)
5459 | ((colour->
uint32[0] & 0x1f) << 10)
5460 | ((colour->
uint32[3] & 0x1) << 15);
5465 | ((colour->
uint32[1] & 0xf) << 4)
5466 | ((colour->
uint32[0] & 0xf) << 8)
5467 | ((colour->
uint32[3] & 0xf) << 12);
5485 ERR(
"Unhandled format %#x.\n",
view->format->dxgi_format);
5492 uint_format,
view->info.buffer.offset,
view->info.buffer.size, &uint_view))
5494 ERR(
"Failed to create buffer view.\n");
5501 memset(&view_desc, 0,
sizeof(view_desc));
5503 view_desc.
format = uint_format;
5512 resource->u.vk_image, &view_desc, &uint_view))
5514 ERR(
"Failed to create image view.\n");
5532 TRACE(
"iface %p, gpu_handle %s, cpu_handle %s, resource %p, values %p, rect_count %u, rects %p.\n",
5544 ERR(
"Failed to create UINT view.\n");
5565 TRACE(
"iface %p, gpu_handle %s, cpu_handle %s, resource %p, values %p, rect_count %u, rects %p.\n",
5577 ERR(
"Failed to create UINT view.\n");
5603 vk_procs = &
list->device->vk_procs;
5632 vk_procs = &
list->device->vk_procs;
5679 TRACE(
"iface %p, heap %p, type %#x, start_index %u, query_count %u, "
5680 "dst_buffer %p, aligned_dst_buffer_offset %#"PRIx64".\n",
5681 iface,
heap,
type, start_index, query_count,
5682 dst_buffer, aligned_dst_buffer_offset);
5684 vk_procs = &
list->device->vk_procs;
5694 FIXME_ONCE(
"D3D12 guarantees binary occlusion queries result in only 0 and 1.\n");
5698 WARN(
"Destination resource is not a buffer.\n");
5707 first = start_index;
5708 offset = aligned_dst_buffer_offset;
5709 for (
i = 0;
i < query_count; ++
i)
5757 TRACE(
"iface %p, buffer %p, aligned_buffer_offset %#"PRIx64", operation %#x.\n",
5762 FIXME(
"Vulkan conditional rendering extension not present. Conditional rendering not supported.\n");
5766 vk_procs = &
list->device->vk_procs;
5775 if (aligned_buffer_offset & (
sizeof(
uint64_t) - 1))
5777 WARN(
"Unaligned predicate argument buffer offset %#"PRIx64".\n", aligned_buffer_offset);
5783 WARN(
"Predicate arguments must be stored in a buffer resource.\n");
5787 FIXME_ONCE(
"Predication doesn't support clear and copy commands, "
5788 "and predication values are treated as 32-bit values.\n");
5792 cond_info.buffer =
resource->u.vk_buffer;
5793 cond_info.offset = aligned_buffer_offset;
5797 cond_info.
flags = 0;
5809 if (
list->is_predicated)
5812 list->is_predicated =
true;
5814 else if (
list->is_predicated)
5817 list->is_predicated =
false;
5835 FIXME(
"iface %p stub!\n", iface);
5854 TRACE(
"iface %p, command_signature %p, max_command_count %u, arg_buffer %p, "
5855 "arg_buffer_offset %#"PRIx64", count_buffer %p, count_buffer_offset %#"PRIx64".\n",
5856 iface, command_signature, max_command_count, arg_buffer, arg_buffer_offset,
5857 count_buffer, count_buffer_offset);
5859 vk_procs = &
list->device->vk_procs;
5861 if (count_buffer && !
list->device->vk_info.KHR_draw_indirect_count)
5863 FIXME(
"Count buffers not supported by Vulkan implementation.\n");
5869 signature_desc = &sig_impl->
desc;
5874 switch (arg_desc->
Type)
5879 WARN(
"Failed to begin render pass, ignoring draw.\n");
5886 arg_buffer_offset, count_impl->
u.
vk_buffer, count_buffer_offset,
5887 max_command_count, signature_desc->
ByteStride));
5892 arg_buffer_offset, max_command_count, signature_desc->
ByteStride));
5899 WARN(
"Failed to begin render pass, ignoring draw.\n");
5908 arg_buffer_offset, count_impl->
u.
vk_buffer, count_buffer_offset,
5909 max_command_count, signature_desc->
ByteStride));
5914 arg_buffer_offset, max_command_count, signature_desc->
ByteStride));
5919 if (max_command_count != 1)
5920 FIXME(
"Ignoring command count %u.\n", max_command_count);
5924 FIXME(
"Count buffers not supported for indirect dispatch.\n");
5930 WARN(
"Failed to update compute state, ignoring dispatch.\n");
5940 FIXME(
"Ignoring unhandled argument type %#x.\n", arg_desc->
Type);
5954 FIXME(
"iface %p, dst_resource %p, dst_offset %#"PRIx64", src_resource %p, "
5955 "src_offset %#"PRIx64", dependent_resource_count %u, "
5956 "dependent_resources %p, dependent_sub_resource_ranges %p stub!\n",
5957 iface, dst_buffer, dst_offset, src_buffer, src_offset,
5958 dependent_resource_count, dependent_resources, dependent_sub_resource_ranges);
5967 FIXME(
"iface %p, dst_resource %p, dst_offset %#"PRIx64", src_resource %p, "
5968 "src_offset %#"PRIx64", dependent_resource_count %u, "
5969 "dependent_resources %p, dependent_sub_resource_ranges %p stub!\n",
5970 iface, dst_buffer, dst_offset, src_buffer, src_offset,
5971 dependent_resource_count, dependent_resources, dependent_sub_resource_ranges);
5980 TRACE(
"iface %p, min %.8e, max %.8e.\n", iface,
min,
max);
5987 if (!
list->device->vk_info.EXT_depth_range_unrestricted && (min < 0.0f || min > 1.0f || max < 0.0f || max > 1.0f))
5989 WARN(
"VK_EXT_depth_range_unrestricted was not found, clamping depth bounds to 0.0 and 1.0.\n");
5994 list->has_depth_bounds =
true;
6001 FIXME(
"iface %p, sample_count %u, pixel_count %u, sample_positions %p stub!\n",
6002 iface, sample_count, pixel_count, sample_positions);
6010 FIXME(
"iface %p, dst_resource %p, dst_sub_resource_idx %u, "
6011 "dst_x %u, dst_y %u, src_resource %p, src_sub_resource_idx %u, "
6012 "src_rect %p, format %#x, mode %#x stub!\n",
6013 iface, dst_resource, dst_sub_resource_idx, dst_x, dst_y,
6014 src_resource, src_sub_resource_idx, src_rect,
format,
mode);
6019 FIXME(
"iface %p, mask %#x stub!\n", iface,
mask);
6042 FIXME(
"iface %p, protected_session %p stub!\n", iface, protected_session);
6049 FIXME(
"iface %p, count %u, render_targets %p, depth_stencil %p, flags %#x stub!\n", iface,
6055 FIXME(
"iface %p stub!\n", iface);
6059 ID3D12MetaCommand *meta_command,
const void *parameters_data,
SIZE_T data_size_in_bytes)
6061 FIXME(
"iface %p, meta_command %p, parameters_data %p, data_size_in_bytes %"PRIuPTR" stub!\n", iface,
6062 meta_command, parameters_data, (
uintptr_t)data_size_in_bytes);
6066 ID3D12MetaCommand *meta_command,
const void *parameters_data,
SIZE_T data_size_in_bytes)
6068 FIXME(
"iface %p, meta_command %p, parameters_data %p, data_size_in_bytes %"PRIuPTR" stub!\n", iface,
6069 meta_command, parameters_data, (
uintptr_t)data_size_in_bytes);
6076 FIXME(
"iface %p, desc %p, count %u, postbuild_info_descs %p stub!\n", iface,
desc,
count, postbuild_info_descs);
6083 FIXME(
"iface %p, desc %p, structures_count %u, src_structure_data %p stub!\n",
6084 iface,
desc, structures_count, src_structure_data);
6091 FIXME(
"iface %p, dst_structure_data %#"PRIx64", src_structure_data %#"PRIx64", mode %u stub!\n",
6092 iface, dst_structure_data, src_structure_data,
mode);
6098 FIXME(
"iface %p, state_object %p stub!\n", iface, state_object);
6104 FIXME(
"iface %p, desc %p stub!\n", iface,
desc);
6110 FIXME(
"iface %p, rate %#x, combiners %p stub!\n", iface,
rate, combiners);
6116 FIXME(
"iface %p, rate_image %p stub!\n", iface, rate_image);
6121 FIXME(
"iface %p, x %u, y %u, z %u stub!\n", iface,
x,
y,
z);
6245 list->descriptor_heap_count = 0;
6272 WARN(
"Command allocator is NULL.\n");
6278 WARN(
"Command list types do not match (allocator %#x, list %#x).\n",
6294 TRACE(
"Created command list %p.\n",
object);
6318 ID3D12CommandQueue_AddRef(iface);
6334 TRACE(
"%p increasing refcount to %u.\n", command_queue,
refcount);
6376 TRACE(
"%p decreasing refcount to %u.\n", command_queue,
refcount);
6438 ERR(
"Failed to acquire queue %p.\n", command_queue->
vkd3d_queue);
6501 TRACE(
"iface %p, resource %p, region_count %u, region_start_coordinates %p, "
6502 "region_sizes %p, heap %p, range_count %u, range_flags %p, heap_range_offsets %p, "
6503 "range_tile_counts %p, flags %#x.\n",
6504 iface,
resource, region_count, region_start_coordinates, region_sizes,
heap, range_count,
6505 range_flags, heap_range_offsets, range_tile_counts,
flags);
6507 if (!region_count || !range_count)
6512 FIXME(
"Command queue %p does not support sparse binding.\n", command_queue);
6516 if (!resource_impl->
tiles.subresource_count)
6518 WARN(
"Resource %p is not a tiled resource.\n", resource_impl);
6522 if (region_count > 1 && !region_start_coordinates)
6524 WARN(
"Region start coordinates must not be NULL when region count is > 1.\n");
6528 if (range_count > 1 && !range_tile_counts)
6530 WARN(
"Range tile counts must not be NULL when range count is > 1.\n");
6537 region_start_coordinates,
sizeof(*region_start_coordinates), region_count))
6539 ERR(
"Failed to allocate region start coordinates.\n");
6543 region_sizes,
sizeof(*region_sizes), region_count))
6545 ERR(
"Failed to allocate region sizes.\n");
6549 range_flags,
sizeof(*range_flags), range_count))
6551 ERR(
"Failed to allocate range flags.\n");
6555 heap_range_offsets,
sizeof(*heap_range_offsets), range_count))
6557 ERR(
"Failed to allocate heap range offsets.\n");
6561 range_tile_counts,
sizeof(*range_tile_counts), range_count))
6563 ERR(
"Failed to allocate range tile counts.\n");
6574 ERR(
"Failed to add op.\n");
6605 TRACE(
"iface %p, dst_resource %p, dst_region_start_coordinate %p, "
6606 "src_resource %p, src_region_start_coordinate %p, region_size %p, flags %#x.\n",
6607 iface, dst_resource, dst_region_start_coordinate, src_resource,
6608 src_region_start_coordinate, region_size,
flags);
6614 ERR(
"Failed to add op.\n");
6618 op->u.copy_mappings.dst_resource = dst_resource_impl;
6619 op->u.copy_mappings.src_resource = src_resource_impl;
6620 op->u.copy_mappings.dst_region_start_coordinate = *dst_region_start_coordinate;
6621 op->u.copy_mappings.src_region_start_coordinate = *src_region_start_coordinate;
6622 op->u.copy_mappings.region_size = *region_size;
6623 op->u.copy_mappings.flags =
flags;
6640 memset(&submit_desc, 0,
sizeof(submit_desc));
6653 ERR(
"Failed to submit queue(s), vr %d.\n", vr);
6660 bool flushed_any =
false;
6663 if (
queue->op_queue.count == 1 && !
queue->is_flushing)
6671 UINT command_list_count, ID3D12CommandList *
const *command_lists)
6679 TRACE(
"iface %p, command_list_count %u, command_lists %p.\n",
6680 iface, command_list_count, command_lists);
6682 if (!command_list_count)
6687 ERR(
"Failed to allocate command buffer array.\n");
6691 for (
i = 0;
i < command_list_count; ++
i)
6698 "Command list %p is in recording state.", command_lists[
i]);
6712 ERR(
"Failed to add op.\n");
6717 op->u.execute.buffer_count = command_list_count;
6729 FIXME(
"iface %p, metadata %#x, data %p, size %u stub!\n",
6736 FIXME(
"iface %p, metadata %#x, data %p, size %u stub!\n",
6742 FIXME(
"iface %p stub!\n", iface);
6757 ERR(
"Failed to add GPU timeline semaphore.\n");
6783 TRACE(
"iface %p, fence %p, value %#"PRIx64".\n", iface, fence_iface,
value);
6789 ERR(
"Failed to add op.\n");
6794 op->u.signal.fence = fence;
6826 if (
device->vk_info.KHR_timeline_semaphore)
6830 ERR(
"Failed to add pending signal.\n");
6841 WARN(
"Failed to create Vulkan fence, vr %d.\n", vr);
6854 device, &vk_semaphore)) < 0)
6856 ERR(
"Failed to create Vulkan semaphore, vr %d.\n", vr);
6870 if (
device->vk_info.KHR_timeline_semaphore)
6878 submit_info.
pNext = &timeline_submit_info;
6882 if (!
device->vk_info.KHR_timeline_semaphore && vr >= 0)
6887 if (!sequence_number)
6895 WARN(
"Failed to submit signal operation, vr %d.\n", vr);
6899 if (
device->vk_info.KHR_timeline_semaphore)
6911 vk_semaphore, fence, timeline_value,
vkd3d_queue);
6935 FIXME(
"Failed to get fence status, vr %d.\n", vr);
6939 if (vk_fence || vk_semaphore)
6952 if (!
device->vk_info.KHR_timeline_semaphore)
6970 vk_procs = &command_queue->
device->vk_procs;
6980 TRACE(
"Already signaled %p, value %#"PRIx64".\n", fence, completed_value);
6986 ERR(
"Failed to acquire queue %p.\n",
queue);
6995 WARN(
"Already waited on fence %p, value %#"PRIx64".\n", fence,
value);
6999 WARN(
"Failed to acquire Vulkan semaphore for fence %p, value %#"PRIx64
7000 ", completed value %#"PRIx64".\n", fence,
value, completed_value);
7018 queue->semaphore_count + 1,
sizeof(*
queue->semaphores)))
7020 ERR(
"Failed to allocate memory for semaphore.\n");
7028 queue->semaphores[
queue->semaphore_count].vk_semaphore =
semaphore->u.binary.vk_semaphore;
7029 queue->semaphores[
queue->semaphore_count].sequence_number =
queue->submitted_sequence_number + 1;
7030 ++
queue->semaphore_count;
7040 WARN(
"Failed to submit wait operation, vr %d.\n", vr);
7065 vk_procs = &command_queue->
device->vk_procs;
7068 if (!command_queue->
device->vk_info.KHR_timeline_semaphore)
7086 submit_info.
pNext = &timeline_submit_info;
7097 ERR(
"Failed to acquire queue %p.\n",
queue);
7107 WARN(
"Failed to submit wait operation, vr %d.\n", vr);
7122 TRACE(
"iface %p, fence %p, value %#"PRIx64".\n", iface, fence_iface,
value);
7128 ERR(
"Failed to add op.\n");
7133 op->u.wait.fence = fence;
7155 WARN(
"Timestamp queries not supported.\n");
7159 *
frequency = 1000000000 /
device->vk_info.device_limits.timestampPeriod;
7164#define NANOSECONDS_IN_A_SECOND 1000000000
7177 TRACE(
"iface %p, gpu_timestamp %p, cpu_timestamp %p.\n",
7178 iface, gpu_timestamp, cpu_timestamp);
7182 WARN(
"Timestamp queries not supported.\n");
7186 if (!gpu_timestamp || !cpu_timestamp)
7189 if (!
device->vk_info.EXT_calibrated_timestamps ||
device->vk_host_time_domain == -1)
7191 WARN(!
device->vk_info.EXT_calibrated_timestamps
7192 ?
"VK_EXT_calibrated_timestamps was not found. Setting timestamps to zero.\n"
7193 :
"Device and/or host time domain is not available. Setting timestamps to zero.\n");
7199 vk_procs = &
device->vk_procs;
7209 ARRAY_SIZE(infos), infos, timestamps, deviations))) < 0)
7211 WARN(
"Failed to get calibrated timestamps, vr %d.\n", vr);
7222 *gpu_timestamp = timestamps[0];
7223 *cpu_timestamp = timestamps[1];
7233 TRACE(
"iface %p, desc %p.\n", iface,
desc);
7280 ERR(
"Cannot reserve memory for %zu new ops.\n",
count);
7291 unsigned int done_count)
7293 queue->aux_op_queue.count -= done_count;
7295 queue->aux_op_queue.count *
sizeof(*
queue->aux_op_queue.
ops));
7304 queue->aux_op_queue.count = 0;
7305 queue->is_flushing =
false;
7319 if (
queue->is_flushing)
7339 queue->is_flushing =
true;
7343 while (
queue->op_queue.count != 0)
7349 for (
i = 0;
i <
queue->aux_op_queue.count; ++
i)
7355 fence =
op->u.wait.fence;
7376 FIXME(
"Tiled resource binding is not supported yet.\n");
7381 FIXME(
"Tiled resource mapping copying is not supported yet.\n");
7390 *flushed_any |=
true;
7393 queue->aux_op_queue.count = 0;
7398 queue->is_flushing =
false;
7416 queue->refcount = 1;
7419 if (!
queue->desc.NodeMask)
7420 queue->desc.NodeMask = 0x1;
7426 queue->last_waited_fence_value = 0;
7429 queue->is_flushing =
false;
7435 FIXME(
"Global realtime priority is not implemented.\n");
7440 FIXME(
"Ignoring priority %#x.\n",
desc->Priority);
7442 FIXME(
"Ignoring flags %#x.\n",
desc->Flags);
7450 goto fail_destroy_op_mutex;
7458fail_destroy_op_mutex:
7479 TRACE(
"Created command queue %p.\n",
object);
7499 WARN(
"Acquired command queue %p with %zu remaining ops.\n", d3d12_queue, d3d12_queue->
op_queue.count);
7501 WARN(
"Acquired command queue %p which is flushing.\n", d3d12_queue);
7530 ID3D12CommandSignature_AddRef(iface);
7642 for (
i = 0;
i <
desc->NumArgumentDescs; ++
i)
7645 switch (argument_desc->
Type)
7650 if (
i !=
desc->NumArgumentDescs - 1)
7652 WARN(
"Draw/dispatch must be the last element of a command signature.\n");
7665 object->refcount = 1;
7666 object->internal_refcount = 1;
7668 object->desc = *
desc;
7675 desc->NumArgumentDescs *
sizeof(*
desc->pArgumentDescs));
7686 TRACE(
"Created command signature %p.\n",
object);
COMPILER_DEPENDENT_UINT64 UINT64
static void set_size(float size)
INT copy(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], INT append, DWORD lpdwFlags, BOOL bTouch)
#define STDMETHODCALLTYPE
set(const _Compare &__comp=_Compare(), const allocator_type &__a=allocator_type())
static void STDMETHODCALLTYPE d3d12_command_list_SetPipelineState1(ID3D12GraphicsCommandList6 *iface, ID3D12StateObject *state_object)
static void STDMETHODCALLTYPE d3d12_command_list_InitializeMetaCommand(ID3D12GraphicsCommandList6 *iface, ID3D12MetaCommand *meta_command, const void *parameters_data, SIZE_T data_size_in_bytes)
static void d3d12_command_list_invalidate_root_parameters(struct d3d12_command_list *list, enum vkd3d_pipeline_bind_point bind_point)
static HRESULT STDMETHODCALLTYPE d3d12_command_allocator_SetName(ID3D12CommandAllocator *iface, const WCHAR *name)
static void STDMETHODCALLTYPE d3d12_command_list_OMSetRenderTargets(ID3D12GraphicsCommandList6 *iface, UINT render_target_descriptor_count, const D3D12_CPU_DESCRIPTOR_HANDLE *render_target_descriptors, BOOL single_descriptor_handle, const D3D12_CPU_DESCRIPTOR_HANDLE *depth_stencil_descriptor)
static const struct d3d12_root_descriptor_table * root_signature_get_descriptor_table(const struct d3d12_root_signature *root_signature, unsigned int index)
static void STDMETHODCALLTYPE d3d12_command_list_ClearUnorderedAccessViewFloat(ID3D12GraphicsCommandList6 *iface, D3D12_GPU_DESCRIPTOR_HANDLE gpu_handle, D3D12_CPU_DESCRIPTOR_HANDLE cpu_handle, ID3D12Resource *resource, const float values[4], UINT rect_count, const D3D12_RECT *rects)
static void d3d12_command_list_invalidate_current_pipeline(struct d3d12_command_list *list)
static struct vkd3d_signaled_semaphore * d3d12_fence_acquire_vk_semaphore_locked(struct d3d12_fence *fence, uint64_t value, uint64_t *completed_value)
static void STDMETHODCALLTYPE d3d12_command_list_BeginQuery(ID3D12GraphicsCommandList6 *iface, ID3D12QueryHeap *heap, D3D12_QUERY_TYPE type, UINT index)
static HRESULT STDMETHODCALLTYPE d3d12_command_queue_SetName(ID3D12CommandQueue *iface, const WCHAR *name)
static bool d3d12_command_list_has_depth_stencil_view(struct d3d12_command_list *list)
static unsigned int d3d12_find_ds_multiplanar_transition(const D3D12_RESOURCE_BARRIER *barriers, unsigned int i, unsigned int barrier_count, unsigned int sub_resource_count)
void vkd3d_queue_destroy(struct vkd3d_queue *queue, struct d3d12_device *device)
static HRESULT STDMETHODCALLTYPE d3d12_command_list_Reset(ID3D12GraphicsCommandList6 *iface, ID3D12CommandAllocator *allocator, ID3D12PipelineState *initial_pipeline_state)
static HRESULT d3d12_fence_update_pending_value(struct d3d12_fence *fence)
static D3D12_COMMAND_LIST_TYPE STDMETHODCALLTYPE d3d12_command_list_GetType(ID3D12GraphicsCommandList6 *iface)
static HRESULT STDMETHODCALLTYPE d3d12_command_queue_QueryInterface(ID3D12CommandQueue *iface, REFIID riid, void **object)
static bool vk_write_descriptor_set_from_d3d12_desc(VkWriteDescriptorSet *vk_descriptor_write, VkDescriptorImageInfo *vk_image_info, const struct d3d12_desc *descriptor, const struct d3d12_root_descriptor_table_range *range, VkDescriptorSet *vk_descriptor_sets, unsigned int index, bool use_array)
static ULONG STDMETHODCALLTYPE d3d12_command_allocator_Release(ID3D12CommandAllocator *iface)
static uint64_t d3d12_fence_get_timeline_wait_value_locked(struct d3d12_fence *fence, uint64_t virtual_value)
static HRESULT d3d12_command_queue_signal(struct d3d12_command_queue *command_queue, struct d3d12_fence *fence, uint64_t value)
static const struct ID3D12Fence1Vtbl d3d12_fence_vtbl
static void STDMETHODCALLTYPE d3d12_command_list_SetComputeRoot32BitConstant(ID3D12GraphicsCommandList6 *iface, UINT root_parameter_index, UINT data, UINT dst_offset)
static HRESULT STDMETHODCALLTYPE d3d12_command_list_QueryInterface(ID3D12GraphicsCommandList6 *iface, REFIID iid, void **object)
static struct d3d12_fence * impl_from_ID3D12Fence1(ID3D12Fence1 *iface)
static bool vk_write_descriptor_set_from_root_descriptor(VkWriteDescriptorSet *vk_descriptor_write, const struct d3d12_root_parameter *root_parameter, VkDescriptorSet vk_descriptor_set, VkBufferView *vk_buffer_view, const VkDescriptorBufferInfo *vk_buffer_info)
static void d3d12_command_list_prepare_descriptors(struct d3d12_command_list *list, enum vkd3d_pipeline_bind_point bind_point)
VkResult vkd3d_create_timeline_semaphore(const struct d3d12_device *device, uint64_t initial_value, VkSemaphore *timeline_semaphore)
static void d3d12_command_list_update_descriptor_table(struct d3d12_command_list *list, enum vkd3d_pipeline_bind_point bind_point, unsigned int index, struct d3d12_desc *base_descriptor)
static void STDMETHODCALLTYPE d3d12_command_list_SetComputeRootConstantBufferView(ID3D12GraphicsCommandList6 *iface, UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address)
static void STDMETHODCALLTYPE d3d12_command_list_CopyTiles(ID3D12GraphicsCommandList6 *iface, ID3D12Resource *tiled_resource, const D3D12_TILED_RESOURCE_COORDINATE *tile_region_start_coordinate, const D3D12_TILE_REGION_SIZE *tile_region_size, ID3D12Resource *buffer, UINT64 buffer_offset, D3D12_TILE_COPY_FLAGS flags)
static bool d3d12_command_allocator_add_buffer_view(struct d3d12_command_allocator *allocator, VkBufferView view)
static void STDMETHODCALLTYPE d3d12_command_list_SetPredication(ID3D12GraphicsCommandList6 *iface, ID3D12Resource *buffer, UINT64 aligned_buffer_offset, D3D12_PREDICATION_OP operation)
static const struct d3d12_root_parameter * root_signature_get_parameter(const struct d3d12_root_signature *root_signature, unsigned int index)
static HRESULT STDMETHODCALLTYPE d3d12_command_queue_GetClockCalibration(ID3D12CommandQueue *iface, UINT64 *gpu_timestamp, UINT64 *cpu_timestamp)
static uint64_t vkd3d_queue_reset_sequence_number_locked(struct vkd3d_queue *queue)
static HRESULT d3d12_fence_add_vk_semaphore(struct d3d12_fence *fence, VkSemaphore vk_semaphore, VkFence vk_fence, uint64_t value, const struct vkd3d_queue *signalling_queue)
static HRESULT STDMETHODCALLTYPE d3d12_command_queue_Wait(ID3D12CommandQueue *iface, ID3D12Fence *fence_iface, UINT64 value)
static HRESULT d3d12_fence_signal(struct d3d12_fence *fence, uint64_t value, VkFence vk_fence, bool on_cpu)
static void vkd3d_uav_clear_state_get_image_pipeline(const struct vkd3d_uav_clear_state *state, VkImageViewType image_view_type, enum vkd3d_format_type format_type, struct vkd3d_uav_clear_pipeline *info)
static void d3d12_command_list_invalidate_current_framebuffer(struct d3d12_command_list *list)
static void d3d12_command_list_update_push_descriptors(struct d3d12_command_list *list, enum vkd3d_pipeline_bind_point bind_point)
static void STDMETHODCALLTYPE d3d12_command_list_ExecuteMetaCommand(ID3D12GraphicsCommandList6 *iface, ID3D12MetaCommand *meta_command, const void *parameters_data, SIZE_T data_size_in_bytes)
static void STDMETHODCALLTYPE d3d12_command_list_IASetVertexBuffers(ID3D12GraphicsCommandList6 *iface, UINT start_slot, UINT view_count, const D3D12_VERTEX_BUFFER_VIEW *views)
static void d3d12_command_queue_op_array_destroy(struct d3d12_command_queue_op_array *array)
static void d3d12_command_list_update_heap_descriptors(struct d3d12_command_list *list, enum vkd3d_pipeline_bind_point bind_point)
static HRESULT STDMETHODCALLTYPE d3d12_command_signature_SetName(ID3D12CommandSignature *iface, const WCHAR *name)
static HRESULT STDMETHODCALLTYPE d3d12_command_allocator_Reset(ID3D12CommandAllocator *iface)
static struct vkd3d_cs_op_data * d3d12_command_queue_op_array_require_space(struct d3d12_command_queue_op_array *array)
static HRESULT STDMETHODCALLTYPE d3d12_command_list_SetName(ID3D12GraphicsCommandList6 *iface, const WCHAR *name)
static void STDMETHODCALLTYPE d3d12_command_list_ResolveSubresource(ID3D12GraphicsCommandList6 *iface, ID3D12Resource *dst, UINT dst_sub_resource_idx, ID3D12Resource *src, UINT src_sub_resource_idx, DXGI_FORMAT format)
static void STDMETHODCALLTYPE d3d12_command_list_DrawIndexedInstanced(ID3D12GraphicsCommandList6 *iface, UINT index_count_per_instance, UINT instance_count, UINT start_vertex_location, INT base_vertex_location, UINT start_instance_location)
static void STDMETHODCALLTYPE d3d12_command_list_RSSetScissorRects(ID3D12GraphicsCommandList6 *iface, UINT rect_count, const D3D12_RECT *rects)
static void STDMETHODCALLTYPE d3d12_command_list_SetMarker(ID3D12GraphicsCommandList6 *iface, UINT metadata, const void *data, UINT size)
static void d3d12_command_list_update_descriptors(struct d3d12_command_list *list, enum vkd3d_pipeline_bind_point bind_point)
static void STDMETHODCALLTYPE d3d12_command_list_SetDescriptorHeaps(ID3D12GraphicsCommandList6 *iface, UINT heap_count, ID3D12DescriptorHeap *const *heaps)
static unsigned int d3d12_command_list_bind_descriptor_table(struct d3d12_command_list *list, struct vkd3d_pipeline_bindings *bindings, unsigned int index, struct d3d12_descriptor_heap **cbv_srv_uav_heap, struct d3d12_descriptor_heap **sampler_heap)
static void d3d12_fence_incref(struct d3d12_fence *fence)
static void STDMETHODCALLTYPE d3d12_command_list_DispatchMesh(ID3D12GraphicsCommandList6 *iface, UINT x, UINT y, UINT z)
static const struct vkd3d_format * vkd3d_fixup_clear_uav_uint_colour(struct d3d12_device *device, DXGI_FORMAT dxgi_format, VkClearColorValue *colour)
static HRESULT STDMETHODCALLTYPE d3d12_fence_SetPrivateDataInterface(ID3D12Fence1 *iface, REFGUID guid, const IUnknown *data)
static void STDMETHODCALLTYPE d3d12_command_list_EndQuery(ID3D12GraphicsCommandList6 *iface, ID3D12QueryHeap *heap, D3D12_QUERY_TYPE type, UINT index)
static void d3d12_command_list_set_root_descriptor(struct d3d12_command_list *list, enum vkd3d_pipeline_bind_point bind_point, unsigned int index, D3D12_GPU_VIRTUAL_ADDRESS gpu_address)
static HRESULT STDMETHODCALLTYPE d3d12_command_signature_GetDevice(ID3D12CommandSignature *iface, REFIID iid, void **device)
static void STDMETHODCALLTYPE d3d12_command_list_ResolveSubresourceRegion(ID3D12GraphicsCommandList6 *iface, ID3D12Resource *dst_resource, UINT dst_sub_resource_idx, UINT dst_x, UINT dst_y, ID3D12Resource *src_resource, UINT src_sub_resource_idx, D3D12_RECT *src_rect, DXGI_FORMAT format, D3D12_RESOLVE_MODE mode)
static HRESULT STDMETHODCALLTYPE d3d12_command_list_SetPrivateDataInterface(ID3D12GraphicsCommandList6 *iface, REFGUID guid, const IUnknown *data)
static struct d3d12_fence * unsafe_impl_from_ID3D12Fence(ID3D12Fence *iface)
#define NANOSECONDS_IN_A_SECOND
static bool d3d12_command_allocator_add_transfer_buffer(struct d3d12_command_allocator *allocator, const struct vkd3d_buffer *buffer)
static void STDMETHODCALLTYPE d3d12_command_list_SetViewInstanceMask(ID3D12GraphicsCommandList6 *iface, UINT mask)
static void command_list_add_descriptor_heap(struct d3d12_command_list *list, struct d3d12_descriptor_heap *heap)
static void STDMETHODCALLTYPE d3d12_command_list_SetGraphicsRoot32BitConstant(ID3D12GraphicsCommandList6 *iface, UINT root_parameter_index, UINT data, UINT dst_offset)
static HRESULT STDMETHODCALLTYPE d3d12_command_queue_GetPrivateData(ID3D12CommandQueue *iface, REFGUID guid, UINT *data_size, void *data)
static void STDMETHODCALLTYPE d3d12_command_list_CopyTextureRegion(ID3D12GraphicsCommandList6 *iface, const D3D12_TEXTURE_COPY_LOCATION *dst, UINT dst_x, UINT dst_y, UINT dst_z, const D3D12_TEXTURE_COPY_LOCATION *src, const D3D12_BOX *src_box)
static HRESULT d3d12_device_flush_blocked_queues_once(struct d3d12_device *device, bool *flushed_any)
static void vkd3d_wait_for_gpu_timeline_semaphore(struct vkd3d_fence_worker *worker, const struct vkd3d_waiting_fence *waiting_fence)
static void d3d12_command_list_transition_resource_to_initial_state(struct d3d12_command_list *list, struct d3d12_resource *resource)
static HRESULT STDMETHODCALLTYPE d3d12_command_allocator_SetPrivateDataInterface(ID3D12CommandAllocator *iface, REFGUID guid, const IUnknown *data)
static HRESULT d3d12_fence_signal_cpu_timeline_semaphore(struct d3d12_fence *fence, uint64_t value)
static ULONG STDMETHODCALLTYPE d3d12_command_queue_Release(ID3D12CommandQueue *iface)
static void vkd3d_uav_clear_state_get_buffer_pipeline(const struct vkd3d_uav_clear_state *state, enum vkd3d_format_type format_type, struct vkd3d_uav_clear_pipeline *info)
static void d3d12_command_list_set_root_signature(struct d3d12_command_list *list, enum vkd3d_pipeline_bind_point bind_point, const struct d3d12_root_signature *root_signature)
static HRESULT STDMETHODCALLTYPE d3d12_fence_SetName(ID3D12Fence1 *iface, const WCHAR *name)
static const struct ID3D12GraphicsCommandList6Vtbl d3d12_command_list_vtbl
static HRESULT vkd3d_fence_worker_start(struct vkd3d_fence_worker *worker, struct vkd3d_queue *queue, struct d3d12_device *device)
static void STDMETHODCALLTYPE d3d12_command_list_RSSetShadingRateImage(ID3D12GraphicsCommandList6 *iface, ID3D12Resource *rate_image)
static void d3d12_fence_signal_external_events_locked(struct d3d12_fence *fence)
static HRESULT d3d12_command_queue_wait_binary_semaphore_locked(struct d3d12_command_queue *command_queue, struct d3d12_fence *fence, uint64_t value)
static void d3d12_command_allocator_free_resources(struct d3d12_command_allocator *allocator, bool keep_reusable_resources)
static void STDMETHODCALLTYPE d3d12_command_list_DrawInstanced(ID3D12GraphicsCommandList6 *iface, UINT vertex_count_per_instance, UINT instance_count, UINT start_vertex_location, UINT start_instance_location)
static void STDMETHODCALLTYPE d3d12_command_list_AtomicCopyBufferUINT64(ID3D12GraphicsCommandList6 *iface, ID3D12Resource *dst_buffer, UINT64 dst_offset, ID3D12Resource *src_buffer, UINT64 src_offset, UINT dependent_resource_count, ID3D12Resource *const *dependent_resources, const D3D12_SUBRESOURCE_RANGE_UINT64 *dependent_sub_resource_ranges)
static void STDMETHODCALLTYPE d3d12_command_queue_EndEvent(ID3D12CommandQueue *iface)
HRESULT d3d12_fence_create(struct d3d12_device *device, uint64_t initial_value, D3D12_FENCE_FLAGS flags, struct d3d12_fence **fence)
static bool vk_barrier_parameters_from_d3d12_resource_state(unsigned int state, unsigned int stencil_state, const struct d3d12_resource *resource, VkQueueFlags vk_queue_flags, const struct vkd3d_vulkan_info *vk_info, VkAccessFlags *access_mask, VkPipelineStageFlags *stage_flags, VkImageLayout *image_layout, struct d3d12_device *device)
static void d3d12_command_list_get_fb_extent(struct d3d12_command_list *list, uint32_t *width, uint32_t *height, uint32_t *layer_count)
static void d3d12_command_list_update_descriptor_tables(struct d3d12_command_list *list, struct vkd3d_pipeline_bindings *bindings, struct d3d12_descriptor_heap **cbv_srv_uav_heap, struct d3d12_descriptor_heap **sampler_heap)
static bool clone_array_parameter(void **dst, const void *src, size_t elem_size, unsigned int count)
static void STDMETHODCALLTYPE d3d12_command_list_SetGraphicsRootDescriptorTable(ID3D12GraphicsCommandList6 *iface, UINT root_parameter_index, D3D12_GPU_DESCRIPTOR_HANDLE base_descriptor)
static const struct ID3D12CommandSignatureVtbl d3d12_command_signature_vtbl
static void STDMETHODCALLTYPE d3d12_command_list_RSSetViewports(ID3D12GraphicsCommandList6 *iface, UINT viewport_count, const D3D12_VIEWPORT *viewports)
static void vkd3d_pipeline_bindings_cleanup(struct vkd3d_pipeline_bindings *bindings)
static HRESULT d3d12_command_list_init(struct d3d12_command_list *list, struct d3d12_device *device, D3D12_COMMAND_LIST_TYPE type, struct d3d12_command_allocator *allocator, ID3D12PipelineState *initial_pipeline_state)
static const struct ID3D12CommandAllocatorVtbl d3d12_command_allocator_vtbl
static void d3d12_fence_remove_vk_semaphore(struct d3d12_fence *fence, struct vkd3d_signaled_semaphore *semaphore)
static HRESULT STDMETHODCALLTYPE d3d12_command_allocator_QueryInterface(ID3D12CommandAllocator *iface, REFIID riid, void **object)
static HRESULT STDMETHODCALLTYPE d3d12_command_allocator_GetPrivateData(ID3D12CommandAllocator *iface, REFGUID guid, UINT *data_size, void *data)
static HRESULT d3d12_command_list_begin_command_buffer(struct d3d12_command_list *list)
static bool validate_d3d12_box(const D3D12_BOX *box)
static const struct d3d12_root_constant * root_signature_get_32bit_constants(const struct d3d12_root_signature *root_signature, unsigned int index)
static ULONG STDMETHODCALLTYPE d3d12_fence_Release(ID3D12Fence1 *iface)
static HRESULT STDMETHODCALLTYPE d3d12_command_allocator_SetPrivateData(ID3D12CommandAllocator *iface, REFGUID guid, UINT data_size, const void *data)
static HRESULT d3d12_command_queue_fixup_after_flush_locked(struct d3d12_command_queue *queue)
static ULONG STDMETHODCALLTYPE d3d12_command_list_AddRef(ID3D12GraphicsCommandList6 *iface)
static ULONG STDMETHODCALLTYPE d3d12_command_signature_AddRef(ID3D12CommandSignature *iface)
static void STDMETHODCALLTYPE d3d12_command_list_ClearDepthStencilView(ID3D12GraphicsCommandList6 *iface, D3D12_CPU_DESCRIPTOR_HANDLE dsv, D3D12_CLEAR_FLAGS flags, float depth, UINT8 stencil, UINT rect_count, const D3D12_RECT *rects)
static void d3d12_command_list_copy_incompatible_texture_region(struct d3d12_command_list *list, struct d3d12_resource *dst_resource, unsigned int dst_sub_resource_idx, const struct vkd3d_format *dst_format, struct d3d12_resource *src_resource, unsigned int src_sub_resource_idx, const struct vkd3d_format *src_format, unsigned int layer_count)
static void d3d12_command_queue_swap_queues(struct d3d12_command_queue *queue)
static bool contains_heap(struct d3d12_descriptor_heap **heap_array, unsigned int count, const struct d3d12_descriptor_heap *query)
static HRESULT d3d12_command_queue_init(struct d3d12_command_queue *queue, struct d3d12_device *device, const D3D12_COMMAND_QUEUE_DESC *desc)
static D3D12_FENCE_FLAGS STDMETHODCALLTYPE d3d12_fence_GetCreationFlags(ID3D12Fence1 *iface)
static void STDMETHODCALLTYPE d3d12_command_list_IASetIndexBuffer(ID3D12GraphicsCommandList6 *iface, const D3D12_INDEX_BUFFER_VIEW *view)
static HRESULT STDMETHODCALLTYPE d3d12_fence_SetEventOnCompletion(ID3D12Fence1 *iface, UINT64 value, HANDLE event)
static void d3d12_command_queue_delete_aux_ops(struct d3d12_command_queue *queue, unsigned int done_count)
static bool d3d12_command_allocator_add_descriptor_pool(struct d3d12_command_allocator *allocator, VkDescriptorPool pool)
static struct d3d12_command_allocator * impl_from_ID3D12CommandAllocator(ID3D12CommandAllocator *iface)
static VkDescriptorPool d3d12_command_allocator_allocate_descriptor_pool(struct d3d12_command_allocator *allocator)
static void vkd3d_queue_update_sequence_number(struct vkd3d_queue *queue, uint64_t sequence_number, struct d3d12_device *device)
static void d3d12_command_list_reset_state(struct d3d12_command_list *list, ID3D12PipelineState *initial_pipeline_state)
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)
static uint64_t d3d12_fence_add_pending_timeline_signal(struct d3d12_fence *fence, uint64_t virtual_value, const struct vkd3d_queue *signalling_queue)
static HRESULT STDMETHODCALLTYPE d3d12_command_signature_SetPrivateDataInterface(ID3D12CommandSignature *iface, REFGUID guid, const IUnknown *data)
static void d3d12_command_list_end_current_render_pass(struct d3d12_command_list *list)
static struct d3d12_command_allocator * unsafe_impl_from_ID3D12CommandAllocator(ID3D12CommandAllocator *iface)
static void vk_extent_3d_from_d3d12_miplevel(VkExtent3D *extent, const D3D12_RESOURCE_DESC1 *resource_desc, unsigned int miplevel_idx)
static struct d3d12_command_list * impl_from_ID3D12GraphicsCommandList6(ID3D12GraphicsCommandList6 *iface)
static void update_mappings_cleanup(struct vkd3d_cs_update_mappings *update_mappings)
static D3D12_COMMAND_QUEUE_DESC *STDMETHODCALLTYPE d3d12_command_queue_GetDesc(ID3D12CommandQueue *iface, D3D12_COMMAND_QUEUE_DESC *desc)
static void STDMETHODCALLTYPE d3d12_command_list_EndRenderPass(ID3D12GraphicsCommandList6 *iface)
static void STDMETHODCALLTYPE d3d12_command_list_AtomicCopyBufferUINT(ID3D12GraphicsCommandList6 *iface, ID3D12Resource *dst_buffer, UINT64 dst_offset, ID3D12Resource *src_buffer, UINT64 src_offset, UINT dependent_resource_count, ID3D12Resource *const *dependent_resources, const D3D12_SUBRESOURCE_RANGE_UINT64 *dependent_sub_resource_ranges)
static void command_list_flush_vk_heap_updates(struct d3d12_command_list *list)
static bool d3d12_command_list_begin_render_pass(struct d3d12_command_list *list)
static void STDMETHODCALLTYPE d3d12_command_list_BuildRaytracingAccelerationStructure(ID3D12GraphicsCommandList6 *iface, const D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_DESC *desc, UINT count, const D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC *postbuild_info_descs)
static void vk_buffer_image_copy_from_d3d12(VkBufferImageCopy *copy, const D3D12_PLACED_SUBRESOURCE_FOOTPRINT *footprint, unsigned int sub_resource_idx, const D3D12_RESOURCE_DESC1 *image_desc, const struct vkd3d_format *format, const D3D12_BOX *src_box, unsigned int dst_x, unsigned int dst_y, unsigned int dst_z)
static void d3d12_fence_garbage_collect_vk_semaphores_locked(struct d3d12_fence *fence, bool destroy_all)
static void d3d12_fence_destroy_vk_objects(struct d3d12_fence *fence)
static HRESULT STDMETHODCALLTYPE d3d12_command_signature_GetPrivateData(ID3D12CommandSignature *iface, REFGUID guid, UINT *data_size, void *data)
static size_t get_query_stride(D3D12_QUERY_TYPE type)
static ULONG STDMETHODCALLTYPE d3d12_command_list_Release(ID3D12GraphicsCommandList6 *iface)
struct d3d12_command_signature * unsafe_impl_from_ID3D12CommandSignature(ID3D12CommandSignature *iface)
static HRESULT d3d12_command_allocator_init(struct d3d12_command_allocator *allocator, struct d3d12_device *device, D3D12_COMMAND_LIST_TYPE type)
void vkd3d_release_vk_queue(ID3D12CommandQueue *queue)
VkQueue vkd3d_acquire_vk_queue(ID3D12CommandQueue *queue)
static void STDMETHODCALLTYPE d3d12_command_list_SetComputeRoot32BitConstants(ID3D12GraphicsCommandList6 *iface, UINT root_parameter_index, UINT constant_count, const void *data, UINT dst_offset)
static bool d3d12_command_list_update_compute_pipeline(struct d3d12_command_list *list)
static void STDMETHODCALLTYPE d3d12_command_list_ExecuteBundle(ID3D12GraphicsCommandList6 *iface, ID3D12GraphicsCommandList *command_list)
static HRESULT d3d12_command_queue_wait_locked(struct d3d12_command_queue *command_queue, struct d3d12_fence *fence, uint64_t value)
static void d3d12_command_list_invalidate_bindings(struct d3d12_command_list *list, struct d3d12_pipeline_state *state)
static void STDMETHODCALLTYPE d3d12_command_list_SetComputeRootUnorderedAccessView(ID3D12GraphicsCommandList6 *iface, UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address)
static HRESULT STDMETHODCALLTYPE d3d12_command_signature_QueryInterface(ID3D12CommandSignature *iface, REFIID iid, void **out)
static const struct ID3D12CommandQueueVtbl d3d12_command_queue_vtbl
static bool d3d12_command_allocator_add_render_pass(struct d3d12_command_allocator *allocator, VkRenderPass pass)
static void STDMETHODCALLTYPE d3d12_command_list_SetComputeRootShaderResourceView(ID3D12GraphicsCommandList6 *iface, UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address)
static void d3d12_command_signature_decref(struct d3d12_command_signature *signature)
HRESULT d3d12_command_allocator_create(struct d3d12_device *device, D3D12_COMMAND_LIST_TYPE type, struct d3d12_command_allocator **allocator)
static void vk_image_subresource_layers_from_d3d12(VkImageSubresourceLayers *subresource, const struct vkd3d_format *format, unsigned int sub_resource_idx, unsigned int miplevel_count)
static void STDMETHODCALLTYPE d3d12_command_list_OMSetDepthBounds(ID3D12GraphicsCommandList6 *iface, FLOAT min, FLOAT max)
static void STDMETHODCALLTYPE d3d12_command_list_SetPipelineState(ID3D12GraphicsCommandList6 *iface, ID3D12PipelineState *pipeline_state)
static void STDMETHODCALLTYPE d3d12_command_list_IASetPrimitiveTopology(ID3D12GraphicsCommandList6 *iface, D3D12_PRIMITIVE_TOPOLOGY topology)
static HRESULT d3d12_command_queue_flush_ops(struct d3d12_command_queue *queue, bool *flushed_any)
static VkResult vkd3d_queue_create_vk_semaphore_locked(struct vkd3d_queue *queue, struct d3d12_device *device, VkSemaphore *vk_semaphore)
static void STDMETHODCALLTYPE d3d12_command_queue_ExecuteCommandLists(ID3D12CommandQueue *iface, UINT command_list_count, ID3D12CommandList *const *command_lists)
static HRESULT STDMETHODCALLTYPE d3d12_fence_GetDevice(ID3D12Fence1 *iface, REFIID iid, void **device)
static HRESULT STDMETHODCALLTYPE d3d12_fence_SetPrivateData(ID3D12Fence1 *iface, REFGUID guid, UINT data_size, const void *data)
static bool d3d12_command_list_update_compute_state(struct d3d12_command_list *list)
static struct d3d12_command_list * unsafe_impl_from_ID3D12CommandList(ID3D12CommandList *iface)
static HRESULT d3d12_command_queue_record_as_blocked(struct d3d12_command_queue *command_queue)
static HRESULT STDMETHODCALLTYPE d3d12_command_allocator_GetDevice(ID3D12CommandAllocator *iface, REFIID iid, void **device)
static void d3d12_command_list_update_uav_counter_descriptors(struct d3d12_command_list *list, enum vkd3d_pipeline_bind_point bind_point)
static void STDMETHODCALLTYPE d3d12_command_list_CopyBufferRegion(ID3D12GraphicsCommandList6 *iface, ID3D12Resource *dst, UINT64 dst_offset, ID3D12Resource *src, UINT64 src_offset, UINT64 byte_count)
static HRESULT STDMETHODCALLTYPE d3d12_command_queue_GetTimestampFrequency(ID3D12CommandQueue *iface, UINT64 *frequency)
static void STDMETHODCALLTYPE d3d12_command_list_WriteBufferImmediate(ID3D12GraphicsCommandList6 *iface, UINT count, const D3D12_WRITEBUFFERIMMEDIATE_PARAMETER *parameters, const D3D12_WRITEBUFFERIMMEDIATE_MODE *modes)
static HRESULT STDMETHODCALLTYPE d3d12_command_list_GetDevice(ID3D12GraphicsCommandList6 *iface, REFIID iid, void **device)
static struct d3d12_command_signature * impl_from_ID3D12CommandSignature(ID3D12CommandSignature *iface)
static void STDMETHODCALLTYPE d3d12_command_queue_UpdateTileMappings(ID3D12CommandQueue *iface, ID3D12Resource *resource, UINT region_count, const D3D12_TILED_RESOURCE_COORDINATE *region_start_coordinates, const D3D12_TILE_REGION_SIZE *region_sizes, ID3D12Heap *heap, UINT range_count, const D3D12_TILE_RANGE_FLAGS *range_flags, const UINT *heap_range_offsets, const UINT *range_tile_counts, D3D12_TILE_MAPPING_FLAGS flags)
static void vk_image_buffer_copy_from_d3d12(VkBufferImageCopy *copy, const D3D12_PLACED_SUBRESOURCE_FOOTPRINT *footprint, unsigned int sub_resource_idx, const D3D12_RESOURCE_DESC1 *image_desc, const struct vkd3d_format *format, const D3D12_BOX *src_box, unsigned int dst_x, unsigned int dst_y, unsigned int dst_z)
static void STDMETHODCALLTYPE d3d12_command_list_CopyResource(ID3D12GraphicsCommandList6 *iface, ID3D12Resource *dst, ID3D12Resource *src)
static void STDMETHODCALLTYPE d3d12_command_list_ClearUnorderedAccessViewUint(ID3D12GraphicsCommandList6 *iface, D3D12_GPU_DESCRIPTOR_HANDLE gpu_handle, D3D12_CPU_DESCRIPTOR_HANDLE cpu_handle, ID3D12Resource *resource, const UINT values[4], UINT rect_count, const D3D12_RECT *rects)
static ULONG STDMETHODCALLTYPE d3d12_command_signature_Release(ID3D12CommandSignature *iface)
static void STDMETHODCALLTYPE d3d12_command_list_ResourceBarrier(ID3D12GraphicsCommandList6 *iface, UINT barrier_count, const D3D12_RESOURCE_BARRIER *barriers)
static void STDMETHODCALLTYPE d3d12_command_list_SOSetTargets(ID3D12GraphicsCommandList6 *iface, UINT start_slot, UINT view_count, const D3D12_STREAM_OUTPUT_BUFFER_VIEW *views)
static void STDMETHODCALLTYPE d3d12_command_queue_CopyTileMappings(ID3D12CommandQueue *iface, ID3D12Resource *dst_resource, const D3D12_TILED_RESOURCE_COORDINATE *dst_region_start_coordinate, ID3D12Resource *src_resource, const D3D12_TILED_RESOURCE_COORDINATE *src_region_start_coordinate, const D3D12_TILE_REGION_SIZE *region_size, D3D12_TILE_MAPPING_FLAGS flags)
static HRESULT vkd3d_fence_worker_stop(struct vkd3d_fence_worker *worker, struct d3d12_device *device)
static void d3d12_command_allocator_remove_command_list(struct d3d12_command_allocator *allocator, const struct d3d12_command_list *list)
void vkd3d_queue_release(struct vkd3d_queue *queue)
static bool d3d12_command_list_update_graphics_pipeline(struct d3d12_command_list *list)
static void STDMETHODCALLTYPE d3d12_command_list_SetGraphicsRootConstantBufferView(ID3D12GraphicsCommandList6 *iface, UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address)
static void STDMETHODCALLTYPE d3d12_command_list_OMSetStencilRef(ID3D12GraphicsCommandList6 *iface, UINT stencil_ref)
static void d3d12_fence_update_pending_value_locked(struct d3d12_fence *fence)
static void d3d12_command_list_set_root_cbv(struct d3d12_command_list *list, enum vkd3d_pipeline_bind_point bind_point, unsigned int index, D3D12_GPU_VIRTUAL_ADDRESS gpu_address)
static void d3d12_fence_decref(struct d3d12_fence *fence)
static void STDMETHODCALLTYPE d3d12_command_list_SetComputeRootSignature(ID3D12GraphicsCommandList6 *iface, ID3D12RootSignature *root_signature)
static UINT64 STDMETHODCALLTYPE d3d12_fence_GetCompletedValue(ID3D12Fence1 *iface)
static void STDMETHODCALLTYPE d3d12_command_list_ClearRenderTargetView(ID3D12GraphicsCommandList6 *iface, D3D12_CPU_DESCRIPTOR_HANDLE rtv, const FLOAT color[4], UINT rect_count, const D3D12_RECT *rects)
static HRESULT d3d12_device_flush_blocked_queues(struct d3d12_device *device)
static void d3d12_command_list_mark_as_invalid(struct d3d12_command_list *list, const char *message,...)
static struct d3d12_command_queue * impl_from_ID3D12CommandQueue(ID3D12CommandQueue *iface)
static ULONG STDMETHODCALLTYPE d3d12_fence_AddRef(ID3D12Fence1 *iface)
static void d3d12_command_signature_incref(struct d3d12_command_signature *signature)
static void d3d12_command_list_set_descriptor_table(struct d3d12_command_list *list, enum vkd3d_pipeline_bind_point bind_point, unsigned int index, D3D12_GPU_DESCRIPTOR_HANDLE base_descriptor)
static void STDMETHODCALLTYPE d3d12_command_list_OMSetBlendFactor(ID3D12GraphicsCommandList6 *iface, const FLOAT blend_factor[4])
static void STDMETHODCALLTYPE d3d12_command_list_DispatchRays(ID3D12GraphicsCommandList6 *iface, const D3D12_DISPATCH_RAYS_DESC *desc)
static void STDMETHODCALLTYPE d3d12_command_list_BeginEvent(ID3D12GraphicsCommandList6 *iface, UINT metadata, const void *data, UINT size)
static HRESULT STDMETHODCALLTYPE d3d12_command_signature_SetPrivateData(ID3D12CommandSignature *iface, REFGUID guid, UINT data_size, const void *data)
static void STDMETHODCALLTYPE d3d12_command_list_SetComputeRootDescriptorTable(ID3D12GraphicsCommandList6 *iface, UINT root_parameter_index, D3D12_GPU_DESCRIPTOR_HANDLE base_descriptor)
static HRESULT STDMETHODCALLTYPE d3d12_command_list_SetPrivateData(ID3D12GraphicsCommandList6 *iface, REFGUID guid, UINT data_size, const void *data)
static void STDMETHODCALLTYPE d3d12_command_list_CopyRaytracingAccelerationStructure(ID3D12GraphicsCommandList6 *iface, D3D12_GPU_VIRTUAL_ADDRESS dst_structure_data, D3D12_GPU_VIRTUAL_ADDRESS src_structure_data, D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE mode)
static HRESULT vkd3d_enqueue_gpu_fence(struct vkd3d_fence_worker *worker, VkFence vk_fence, struct d3d12_fence *fence, uint64_t value, struct vkd3d_queue *queue, uint64_t queue_sequence_number)
static void d3d12_command_queue_op_array_init(struct d3d12_command_queue_op_array *array)
uint32_t vkd3d_get_vk_queue_family_index(ID3D12CommandQueue *queue)
static HRESULT STDMETHODCALLTYPE d3d12_command_list_GetPrivateData(ID3D12GraphicsCommandList6 *iface, REFGUID guid, UINT *data_size, void *data)
static void d3d12_command_list_update_virtual_descriptors(struct d3d12_command_list *list, enum vkd3d_pipeline_bind_point bind_point)
static void * vkd3d_fence_worker_main(void *arg)
static void d3d12_fence_release_vk_semaphore(struct d3d12_fence *fence, struct vkd3d_signaled_semaphore *semaphore)
static bool is_ds_multiplanar_resolvable(unsigned int first_state, unsigned int second_state)
static void d3d12_command_list_track_resource_usage(struct d3d12_command_list *list, struct d3d12_resource *resource)
static void vkd3d_buffer_destroy(struct vkd3d_buffer *buffer, struct d3d12_device *device)
static void d3d12_command_list_set_root_constants(struct d3d12_command_list *list, enum vkd3d_pipeline_bind_point bind_point, unsigned int index, unsigned int offset, unsigned int count, const void *data)
static void d3d12_command_list_check_index_buffer_strip_cut_value(struct d3d12_command_list *list)
static void d3d12_command_queue_destroy_op(struct vkd3d_cs_op_data *op)
static HRESULT d3d12_command_allocator_allocate_command_buffer(struct d3d12_command_allocator *allocator, struct d3d12_command_list *list)
struct vkd3d_queue * d3d12_device_get_vkd3d_queue(struct d3d12_device *device, D3D12_COMMAND_LIST_TYPE type)
static void STDMETHODCALLTYPE d3d12_command_list_RSSetShadingRate(ID3D12GraphicsCommandList6 *iface, D3D12_SHADING_RATE rate, const D3D12_SHADING_RATE_COMBINER *combiners)
static void STDMETHODCALLTYPE d3d12_command_list_ClearState(ID3D12GraphicsCommandList6 *iface, ID3D12PipelineState *pipeline_state)
static struct vkd3d_view * create_uint_view(struct d3d12_device *device, const struct vkd3d_resource_view *view, struct d3d12_resource *resource, VkClearColorValue *colour)
static ULONG STDMETHODCALLTYPE d3d12_command_allocator_AddRef(ID3D12CommandAllocator *iface)
static void STDMETHODCALLTYPE d3d12_command_list_EndEvent(ID3D12GraphicsCommandList6 *iface)
static void d3d12_command_list_allocator_destroyed(struct d3d12_command_list *list)
static void STDMETHODCALLTYPE d3d12_command_list_SetGraphicsRootSignature(ID3D12GraphicsCommandList6 *iface, ID3D12RootSignature *root_signature)
HRESULT d3d12_command_queue_create(struct d3d12_device *device, const D3D12_COMMAND_QUEUE_DESC *desc, struct d3d12_command_queue **queue)
static void d3d12_fence_signal_timeline_semaphore(struct d3d12_fence *fence, uint64_t timeline_value)
static VkDescriptorSet d3d12_command_allocator_allocate_descriptor_set(struct d3d12_command_allocator *allocator, VkDescriptorSetLayout vk_set_layout, unsigned int variable_binding_size, bool unbounded)
HRESULT vkd3d_queue_create(struct d3d12_device *device, uint32_t family_index, const VkQueueFamilyProperties *properties, struct vkd3d_queue **queue)
static VkResult vkd3d_queue_wait_idle(struct vkd3d_queue *queue, const struct vkd3d_vk_device_procs *vk_procs)
static void d3d12_command_queue_execute(struct d3d12_command_queue *command_queue, VkCommandBuffer *buffers, unsigned int count)
static void d3d12_command_queue_submit_locked(struct d3d12_command_queue *queue)
static HRESULT STDMETHODCALLTYPE d3d12_command_list_Close(ID3D12GraphicsCommandList6 *iface)
static bool d3d12_command_allocator_add_view(struct d3d12_command_allocator *allocator, struct vkd3d_view *view)
static void STDMETHODCALLTYPE d3d12_command_list_Dispatch(ID3D12GraphicsCommandList6 *iface, UINT x, UINT y, UINT z)
static HRESULT STDMETHODCALLTYPE d3d12_command_queue_Signal(ID3D12CommandQueue *iface, ID3D12Fence *fence_iface, UINT64 value)
static void vk_image_copy_from_d3d12(VkImageCopy *image_copy, unsigned int src_sub_resource_idx, unsigned int dst_sub_resource_idx, const D3D12_RESOURCE_DESC1 *src_desc, const D3D12_RESOURCE_DESC1 *dst_desc, const struct vkd3d_format *src_format, const struct vkd3d_format *dst_format, const D3D12_BOX *src_box, unsigned int dst_x, unsigned int dst_y, unsigned int dst_z)
static const struct d3d12_root_parameter * root_signature_get_root_descriptor(const struct d3d12_root_signature *root_signature, unsigned int index)
static HRESULT d3d12_command_list_allocate_transfer_buffer(struct d3d12_command_list *list, VkDeviceSize size, struct vkd3d_buffer *buffer)
static void STDMETHODCALLTYPE d3d12_command_list_EmitRaytracingAccelerationStructurePostbuildInfo(ID3D12GraphicsCommandList6 *iface, const D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC *desc, UINT structures_count, const D3D12_GPU_VIRTUAL_ADDRESS *src_structure_data)
static void d3d12_command_list_clear(struct d3d12_command_list *list, const struct VkAttachmentDescription *attachment_desc, const struct VkAttachmentReference *color_reference, const struct VkAttachmentReference *ds_reference, struct vkd3d_view *view, size_t width, size_t height, unsigned int layer_count, const union VkClearValue *clear_value, unsigned int rect_count, const D3D12_RECT *rects)
static HRESULT STDMETHODCALLTYPE d3d12_fence_QueryInterface(ID3D12Fence1 *iface, REFIID riid, void **object)
static void STDMETHODCALLTYPE d3d12_command_list_SetSamplePositions(ID3D12GraphicsCommandList6 *iface, UINT sample_count, UINT pixel_count, D3D12_SAMPLE_POSITION *sample_positions)
static HRESULT STDMETHODCALLTYPE d3d12_command_queue_SetPrivateDataInterface(ID3D12CommandQueue *iface, REFGUID guid, const IUnknown *data)
static void STDMETHODCALLTYPE d3d12_command_list_SetGraphicsRoot32BitConstants(ID3D12GraphicsCommandList6 *iface, UINT root_parameter_index, UINT constant_count, const void *data, UINT dst_offset)
VkQueue vkd3d_queue_acquire(struct vkd3d_queue *queue)
static ULONG STDMETHODCALLTYPE d3d12_command_queue_AddRef(ID3D12CommandQueue *iface)
static HRESULT STDMETHODCALLTYPE d3d12_fence_Signal(ID3D12Fence1 *iface, UINT64 value)
static void d3d12_command_list_bind_descriptor_heap(struct d3d12_command_list *list, enum vkd3d_pipeline_bind_point bind_point, struct d3d12_descriptor_heap *heap)
static void STDMETHODCALLTYPE d3d12_command_list_ExecuteIndirect(ID3D12GraphicsCommandList6 *iface, ID3D12CommandSignature *command_signature, UINT max_command_count, ID3D12Resource *arg_buffer, UINT64 arg_buffer_offset, ID3D12Resource *count_buffer, UINT64 count_buffer_offset)
static HRESULT STDMETHODCALLTYPE d3d12_fence_GetPrivateData(ID3D12Fence1 *iface, REFGUID guid, UINT *data_size, void *data)
static HRESULT d3d12_fence_init(struct d3d12_fence *fence, struct d3d12_device *device, UINT64 initial_value, D3D12_FENCE_FLAGS flags)
static void STDMETHODCALLTYPE d3d12_command_list_ResolveQueryData(ID3D12GraphicsCommandList6 *iface, ID3D12QueryHeap *heap, D3D12_QUERY_TYPE type, UINT start_index, UINT query_count, ID3D12Resource *dst_buffer, UINT64 aligned_dst_buffer_offset)
static HRESULT vkd3d_enqueue_timeline_semaphore(struct vkd3d_fence_worker *worker, VkSemaphore vk_semaphore, struct d3d12_fence *fence, uint64_t value, struct vkd3d_queue *queue)
static void STDMETHODCALLTYPE d3d12_command_queue_SetMarker(ID3D12CommandQueue *iface, UINT metadata, const void *data, UINT size)
static void STDMETHODCALLTYPE d3d12_command_list_SetGraphicsRootUnorderedAccessView(ID3D12GraphicsCommandList6 *iface, UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address)
static void STDMETHODCALLTYPE d3d12_command_list_SetGraphicsRootShaderResourceView(ID3D12GraphicsCommandList6 *iface, UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address)
static void d3d12_command_list_invalidate_current_render_pass(struct d3d12_command_list *list)
static HRESULT STDMETHODCALLTYPE d3d12_command_queue_GetDevice(ID3D12CommandQueue *iface, REFIID iid, void **device)
static void STDMETHODCALLTYPE d3d12_command_list_SetProtectedResourceSession(ID3D12GraphicsCommandList6 *iface, ID3D12ProtectedResourceSession *protected_session)
static bool d3d12_command_allocator_add_framebuffer(struct d3d12_command_allocator *allocator, VkFramebuffer framebuffer)
static HRESULT d3d12_command_queue_flush_ops_locked(struct d3d12_command_queue *queue, bool *flushed_any)
static void STDMETHODCALLTYPE d3d12_command_queue_BeginEvent(ID3D12CommandQueue *iface, UINT metadata, const void *data, UINT size)
static void d3d12_command_list_clear_uav(struct d3d12_command_list *list, struct d3d12_resource *resource, struct vkd3d_view *descriptor, const VkClearColorValue *clear_colour, unsigned int rect_count, const D3D12_RECT *rects)
static void STDMETHODCALLTYPE d3d12_command_list_BeginRenderPass(ID3D12GraphicsCommandList6 *iface, UINT count, const D3D12_RENDER_PASS_RENDER_TARGET_DESC *render_targets, const D3D12_RENDER_PASS_DEPTH_STENCIL_DESC *depth_stencil, D3D12_RENDER_PASS_FLAGS flags)
static bool d3d12_command_list_update_current_framebuffer(struct d3d12_command_list *list)
static void vkd3d_wait_for_gpu_fence(struct vkd3d_fence_worker *worker, const struct vkd3d_waiting_fence *waiting_fence)
static void STDMETHODCALLTYPE d3d12_command_list_DiscardResource(ID3D12GraphicsCommandList6 *iface, ID3D12Resource *resource, const D3D12_DISCARD_REGION *region)
static bool d3d12_command_queue_op_array_append(struct d3d12_command_queue_op_array *array, size_t count, const struct vkd3d_cs_op_data *new_ops)
static VkResult d3d12_fence_create_vk_fence(struct d3d12_fence *fence, VkFence *vk_fence)
static HRESULT STDMETHODCALLTYPE d3d12_command_queue_SetPrivateData(ID3D12CommandQueue *iface, REFGUID guid, UINT data_size, const void *data)
HRESULT d3d12_command_signature_create(struct d3d12_device *device, const D3D12_COMMAND_SIGNATURE_DESC *desc, struct d3d12_command_signature **signature)
struct __type_info type_info
D3D12_WRITEBUFFERIMMEDIATE_MODE
const UINT D3D12_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE
@ D3D12_RESOURCE_STATE_RESOLVE_DEST
@ D3D12_RESOURCE_STATE_INDEX_BUFFER
@ D3D12_RESOURCE_STATE_COPY_DEST
@ D3D12_RESOURCE_STATE_RENDER_TARGET
@ D3D12_RESOURCE_STATE_COPY_SOURCE
@ D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE
@ D3D12_RESOURCE_STATE_UNORDERED_ACCESS
@ D3D12_RESOURCE_STATE_INDIRECT_ARGUMENT
@ D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE
@ D3D12_RESOURCE_STATE_DEPTH_WRITE
@ D3D12_RESOURCE_STATE_DEPTH_READ
@ D3D12_RESOURCE_STATE_STREAM_OUT
@ D3D12_RESOURCE_STATE_COMMON
@ D3D12_RESOURCE_STATE_RESOLVE_SOURCE
@ D3D12_RESOURCE_STATE_VERTEX_AND_CONSTANT_BUFFER
@ D3D12_RESOURCE_STATE_PRESENT
@ D3D12_PREDICATION_OP_NOT_EQUAL_ZERO
@ D3D12_PREDICATION_OP_EQUAL_ZERO
@ D3D12_RESOURCE_BARRIER_FLAG_BEGIN_ONLY
@ D3D12_RESOURCE_BARRIER_FLAG_END_ONLY
const UINT D3D12_MAX_ROOT_COST
@ D3D12_COMMAND_LIST_TYPE_COPY
@ D3D12_COMMAND_LIST_TYPE_DIRECT
@ D3D12_COMMAND_LIST_TYPE_COMPUTE
D3D12_SHADING_RATE_COMBINER
@ D3D12_COMMAND_QUEUE_PRIORITY_GLOBAL_REALTIME
@ D3D12_RESOURCE_DIMENSION_BUFFER
D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE
@ D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL
@ D3D12_RESOURCE_FLAG_DENY_SHADER_RESOURCE
@ D3D12_CLEAR_FLAG_STENCIL
@ D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE
@ D3D12_QUERY_TYPE_OCCLUSION
@ D3D12_QUERY_TYPE_SO_STATISTICS_STREAM3
@ D3D12_QUERY_TYPE_BINARY_OCCLUSION
@ D3D12_QUERY_TYPE_TIMESTAMP
@ D3D12_QUERY_TYPE_SO_STATISTICS_STREAM0
@ D3D12_QUERY_TYPE_PIPELINE_STATISTICS
@ D3D12_TEXTURE_COPY_TYPE_PLACED_FOOTPRINT
@ D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX
const UINT D3D12_SIMULTANEOUS_RENDER_TARGET_COUNT
@ D3D12_TEXTURE_LAYOUT_ROW_MAJOR
@ D3D12_INDIRECT_ARGUMENT_TYPE_DISPATCH
@ D3D12_INDIRECT_ARGUMENT_TYPE_DRAW
@ D3D12_INDIRECT_ARGUMENT_TYPE_DRAW_INDEXED
@ D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE
@ D3D12_ROOT_PARAMETER_TYPE_SRV
@ D3D12_ROOT_PARAMETER_TYPE_UAV
@ D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS
@ D3D12_ROOT_PARAMETER_TYPE_CBV
@ D3D12_RESOURCE_BARRIER_TYPE_UAV
@ D3D12_RESOURCE_BARRIER_TYPE_TRANSITION
@ D3D12_RESOURCE_BARRIER_TYPE_ALIASING
@ D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV
@ D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_0xFFFF
@ D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_0xFFFFFFFF
@ D3D12_HEAP_TYPE_DEFAULT
const UINT D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES
UINT64 D3D12_GPU_VIRTUAL_ADDRESS
@ D3D_PRIMITIVE_TOPOLOGY_POINTLIST
static HRESULT hresult_from_vk_result(VkResult vr)
static void depth_stencil(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
static const FxOffsetAndName offsets[]
GLint GLint GLsizei GLsizei GLsizei depth
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei count
GLint GLint GLsizei GLsizei height
GLuint GLuint GLsizei GLenum type
GLint GLint GLint GLint GLint GLint y
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLint GLint GLsizei width
GLdouble GLdouble GLdouble GLdouble top
GLboolean GLenum GLenum GLvoid * values
GLint GLfloat GLint stencil
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
#define memcpy(s1, s2, n)
#define memmove(s1, s2, n)
struct task_struct * current
D3D11_SHADER_VARIABLE_DESC desc
static const char * dst_format
static LARGE_INTEGER * frequency
static const struct @662 sizes[]
#define IsEqualGUID(rguid1, rguid2)
void d3d12_device_mark_as_removed(struct d3d12_device *device, HRESULT reason, const char *message,...)
void * vkd3d_gpu_va_allocator_dereference(struct vkd3d_gpu_va_allocator *allocator, D3D12_GPU_VIRTUAL_ADDRESS address)
HRESULT vkd3d_join_thread(struct vkd3d_instance *instance, union vkd3d_thread_handle *thread)
HRESULT vkd3d_create_thread(struct vkd3d_instance *instance, PFN_vkd3d_thread thread_main, void *data, union vkd3d_thread_handle *thread)
void d3d12_desc_flush_vk_heap_updates_locked(struct d3d12_descriptor_heap *descriptor_heap, struct d3d12_device *device)
void vkd3d_view_decref(void *view, struct d3d12_device *device)
struct d3d12_heap * unsafe_impl_from_ID3D12Heap(ID3D12Heap *iface)
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)
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)
bool d3d12_resource_is_cpu_accessible(const struct d3d12_resource *resource)
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)
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)
struct d3d12_query_heap * unsafe_impl_from_ID3D12QueryHeap(ID3D12QueryHeap *iface)
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)
struct d3d12_root_signature * unsafe_impl_from_ID3D12RootSignature(ID3D12RootSignature *iface)
VkPipeline d3d12_pipeline_state_get_or_create_pipeline(struct d3d12_pipeline_state *state, D3D12_PRIMITIVE_TOPOLOGY topology, const uint32_t *strides, VkFormat dsv_format, VkRenderPass *vk_render_pass)
struct d3d12_pipeline_state * unsafe_impl_from_ID3D12PipelineState(ID3D12PipelineState *iface)
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)
HRESULT vkd3d_set_private_data_interface(struct vkd3d_private_store *store, const GUID *tag, const IUnknown *object)
bool is_write_resource_state(D3D12_RESOURCE_STATES state)
const struct vkd3d_format * vkd3d_get_format(const struct d3d12_device *device, DXGI_FORMAT dxgi_format, bool depth_stencil)
const char * debug_gpu_handle(D3D12_GPU_DESCRIPTOR_HANDLE handle)
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)
const struct vkd3d_format * vkd3d_find_uint_format(const struct d3d12_device *device, DXGI_FORMAT dxgi_format)
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)
wchar_t const *const size_t const buffer_size
const D3D12_INDIRECT_ARGUMENT_DESC * pArgumentDescs
D3D12_DESCRIPTOR_HEAP_FLAGS Flags
D3D12_INDIRECT_ARGUMENT_TYPE Type
D3D12_RESOURCE_TRANSITION_BARRIER Transition
D3D12_RESOURCE_DIMENSION Dimension
D3D12_RESOURCE_FLAGS Flags
D3D12_TEXTURE_LAYOUT Layout
DXGI_SAMPLE_DESC SampleDesc
D3D12_RESOURCE_STATES StateBefore
ID3D12Resource * pResource
D3D12_RESOURCE_STATES StateAfter
ID3D12Resource * pResource
D3D12_GPU_VIRTUAL_ADDRESS BufferFilledSizeLocation
D3D12_GPU_VIRTUAL_ADDRESS BufferLocation
D3D12_GPU_VIRTUAL_ADDRESS BufferLocation
VkAttachmentLoadOp loadOp
VkAttachmentStoreOp stencilStoreOp
VkSampleCountFlagBits samples
VkAttachmentDescriptionFlags flags
VkAttachmentStoreOp storeOp
VkImageLayout initialLayout
VkImageLayout finalLayout
VkAttachmentLoadOp stencilLoadOp
VkAccessFlags srcAccessMask
VkAccessFlags dstAccessMask
uint32_t srcQueueFamilyIndex
uint32_t dstQueueFamilyIndex
VkTimeDomainKHR timeDomain
uint32_t commandBufferCount
VkCommandBufferLevel level
const VkCommandBufferInheritanceInfo * pInheritanceInfo
VkCommandBufferUsageFlags flags
uint32_t queueFamilyIndex
VkCommandPoolCreateFlags flags
VkConditionalRenderingFlagsEXT flags
VkImageLayout imageLayout
const VkDescriptorPoolSize * pPoolSizes
VkDescriptorPoolCreateFlags flags
uint32_t descriptorSetCount
const VkDescriptorSetLayout * pSetLayouts
const VkImageView * pAttachments
VkFramebufferCreateFlags flags
VkImageSubresourceLayers srcSubresource
VkImageSubresourceLayers dstSubresource
VkAccessFlags dstAccessMask
uint32_t dstQueueFamilyIndex
VkAccessFlags srcAccessMask
VkImageSubresourceRange subresourceRange
uint32_t srcQueueFamilyIndex
VkImageSubresourceLayers dstSubresource
VkImageSubresourceLayers srcSubresource
VkImageAspectFlags aspectMask
VkImageAspectFlags aspectMask
VkAccessFlags dstAccessMask
VkAccessFlags srcAccessMask
uint32_t maxUniformBufferRange
uint32_t maxComputeWorkGroupCount[3]
VkBool32 depthBoundsTestEnable
uint32_t timestampValidBits
const VkClearValue * pClearValues
const VkSubpassDescription * pSubpasses
const VkSubpassDependency * pDependencies
const VkAttachmentDescription * pAttachments
VkRenderPassCreateFlags flags
VkSemaphoreCreateFlags flags
uint32_t waitSemaphoreCount
const VkPipelineStageFlags * pWaitDstStageMask
uint32_t commandBufferCount
const VkSemaphore * pWaitSemaphores
uint32_t signalSemaphoreCount
const VkCommandBuffer * pCommandBuffers
const VkSemaphore * pSignalSemaphores
const VkAttachmentReference * pDepthStencilAttachment
VkSubpassDescriptionFlags flags
uint32_t inputAttachmentCount
const VkAttachmentReference * pResolveAttachments
const uint32_t * pPreserveAttachments
const VkAttachmentReference * pInputAttachments
uint32_t colorAttachmentCount
const VkAttachmentReference * pColorAttachments
VkPipelineBindPoint pipelineBindPoint
uint32_t preserveAttachmentCount
uint32_t signalSemaphoreValueCount
uint32_t waitSemaphoreValueCount
const uint64_t * pWaitSemaphoreValues
const uint64_t * pSignalSemaphoreValues
const VkBufferView * pTexelBufferView
const VkDescriptorImageInfo * pImageInfo
const VkDescriptorBufferInfo * pBufferInfo
VkDescriptorType descriptorType
ID3D12CommandAllocator ID3D12CommandAllocator_iface
ID3D12GraphicsCommandList6 ID3D12GraphicsCommandList6_iface
VkCommandBuffer vk_command_buffer
struct d3d12_command_allocator * allocator
struct vkd3d_private_store private_store
D3D12_COMMAND_QUEUE_DESC desc
const struct d3d12_fence * last_waited_fence
bool supports_sparse_binding
ID3D12CommandQueue ID3D12CommandQueue_iface
struct d3d12_command_queue_op_array op_queue
struct vkd3d_mutex op_mutex
struct d3d12_device * device
uint64_t last_waited_fence_value
struct d3d12_command_queue_op_array aux_op_queue
struct vkd3d_queue * vkd3d_queue
struct vkd3d_fence_worker fence_worker
ID3D12CommandSignature ID3D12CommandSignature_iface
D3D12_COMMAND_SIGNATURE_DESC desc
D3D12_DESCRIPTOR_HEAP_DESC desc
unsigned int unbounded_offset
VkDescriptorSetLayout vk_layout
struct vkd3d_vk_device_procs vk_procs
VkSampleCountFlagBits sample_count
struct d3d12_resource * resource
const struct vkd3d_format * format
uint64_t pending_timeline_value
struct vkd3d_signaled_semaphore * semaphores
struct vkd3d_cond null_event_cond
unsigned int internal_refcount
struct d3d12_fence::vkd3d_waiting_event * events
ID3D12Fence1 ID3D12Fence1_iface
struct vkd3d_private_store private_store
unsigned int semaphore_count
VkFence old_vk_fences[VKD3D_MAX_VK_SYNC_OBJECTS]
struct d3d12_device * device
VkSemaphore timeline_semaphore
uint64_t max_pending_value
VkPipelineDepthStencilStateCreateInfo ds_desc
D3D12_INDEX_BUFFER_STRIP_CUT_VALUE index_buffer_strip_cut_value
unsigned int null_attachment_mask
VkQueryPool vk_query_pool
union d3d12_resource::@6027 u
struct d3d12_resource_tile_info tiles
D3D12_GPU_VIRTUAL_ADDRESS gpu_address
const struct vkd3d_format * format
D3D12_RESOURCE_DESC1 desc
unsigned int descriptor_count
struct d3d12_root_descriptor_table_range * ranges
union d3d12_root_parameter::@6033 u
struct d3d12_root_descriptor descriptor
D3D12_ROOT_PARAMETER_TYPE parameter_type
uint64_t descriptor_table_mask
uint32_t push_descriptor_mask
struct d3d12_descriptor_set_layout descriptor_set_layouts[VKD3D_MAX_DESCRIPTOR_SETS]
unsigned int descriptor_table_offset
struct d3d12_root_parameter * parameters
bool use_descriptor_arrays
VkPipelineLayout vk_pipeline_layout
VkSampleCountFlagBits sample_count
const struct vkd3d_format * format
struct d3d12_resource * resource
const struct queue_ops * ops
struct vkd3d_cs_update_mappings update_mappings
struct vkd3d_queue * queue
void(* wait_for_gpu_fence)(struct vkd3d_fence_worker *worker, const struct vkd3d_waiting_fence *enqueued_fence)
struct vkd3d_waiting_fence * fences
struct d3d12_device * device
union vkd3d_thread_handle thread
struct vkd3d_push_descriptor push_descriptors[D3D12_MAX_ROOT_COST/2]
const struct d3d12_root_signature * root_signature
uint32_t push_descriptor_dirty_mask
struct d3d12_desc * descriptor_tables[D3D12_MAX_ROOT_COST]
uint32_t push_descriptor_active_mask
VkBufferView * vk_uav_counter_views
VkDescriptorSet descriptor_sets[VKD3D_MAX_DESCRIPTOR_SETS]
uint64_t descriptor_table_dirty_mask
uint64_t descriptor_table_active_mask
uint64_t cbv_srv_uav_heap_id
size_t descriptor_set_count
VkPipelineBindPoint vk_bind_point
struct vkd3d_push_descriptor::@6035::@6036 cbv
VkBufferView vk_buffer_view
union vkd3d_push_descriptor::@6035 u
uint64_t submitted_sequence_number
unsigned int miplevel_idx
struct vkd3d_shader_descriptor_binding binding
const struct vkd3d_queue * signalling_queue
unsigned int miplevel_idx
const struct vkd3d_format * format
VkImageAspectFlags vk_image_aspect
unsigned int miplevel_count
VkImageViewType view_type
VkDescriptorSetLayout vk_set_layout
VkPipelineLayout vk_pipeline_layout
VkPhysicalDeviceLimits device_limits
bool EXT_conditional_rendering
union vkd3d_waiting_fence::@6023 u
struct d3d12_fence * fence
uint64_t queue_sequence_number
#define CONTAINING_RECORD(address, type, field)
VkClearDepthStencilValue depthStencil
#define VKD3D_RESOURCE_PRESENT_STATE_TRANSITION
#define VKD3D_RESOURCE_INITIAL_STATE_TRANSITION
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_mutex_init(struct vkd3d_mutex *lock)
static void vkd3d_mutex_unlock(struct vkd3d_mutex *lock)
static void vkd3d_mutex_lock(struct vkd3d_mutex *lock)
void vkd3d_set_thread_name(const char *name)
static void vkd3d_cond_broadcast(struct vkd3d_cond *cond)
static void vkd3d_mutex_destroy(struct vkd3d_mutex *lock)
static uint32_t vkd3d_atomic_decrement_u32(uint32_t volatile *x)
static void vkd3d_cond_destroy(struct vkd3d_cond *cond)
#define vkd3d_unreachable()
#define VKD3D_ASSERT(cond)
const char const char * vkd3d_dbg_vsprintf(const char *fmt, va_list args)
#define vkd3d_clamp(value, lower, upper)
static uint32_t vkd3d_atomic_increment_u32(uint32_t volatile *x)
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)
#define VKD3D_DESCRIPTOR_MAGIC_SRV
static bool vkd3d_format_is_compressed(const struct vkd3d_format *format)
vkd3d_vk_descriptor_set_index
@ VKD3D_FORMAT_TYPE_TYPELESS
static unsigned int d3d12_desc_heap_range_size(const struct d3d12_desc *descriptor)
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)
vkd3d_pipeline_bind_point
@ VKD3D_PIPELINE_BIND_POINT_GRAPHICS
@ VKD3D_PIPELINE_BIND_POINT_COMPUTE
static ULONG d3d12_device_release(struct d3d12_device *device)
#define VKD3D_DESCRIPTOR_MAGIC_CBV
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_query_heap_is_result_available(const struct d3d12_query_heap *heap, unsigned int query_index)
static unsigned int d3d12_resource_desc_get_width(const D3D12_RESOURCE_DESC1 *desc, unsigned int miplevel_idx)
static bool d3d12_resource_is_buffer(const struct d3d12_resource *resource)
#define VKD3D_MAX_DEVICE_BLOCKED_QUEUES
static bool d3d12_pipeline_state_is_graphics(const struct d3d12_pipeline_state *state)
static void debug_ignored_node_mask(unsigned int mask)
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 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_desc * d3d12_desc_from_gpu_handle(D3D12_GPU_DESCRIPTOR_HANDLE gpu_handle)
static bool d3d12_pipeline_state_is_compute(const struct d3d12_pipeline_state *state)
static bool vkd3d_view_incref(void *desc)
static bool d3d12_pipeline_state_has_unknown_dsv_format(struct d3d12_pipeline_state *state)
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)
#define VKD3D_MAX_VK_SYNC_OBJECTS
#define VKD3D_DESCRIPTOR_MAGIC_UAV
static unsigned int d3d12_resource_desc_get_depth(const D3D12_RESOURCE_DESC1 *desc, unsigned int miplevel_idx)
static void d3d12_query_heap_mark_result_as_available(struct d3d12_query_heap *heap, unsigned int query_index)
#define VKD3D_DESCRIPTOR_MAGIC_SAMPLER
static unsigned int vkd3d_compute_workgroup_count(unsigned int thread_count, unsigned int workgroup_size)
static struct d3d12_dsv_desc * d3d12_dsv_desc_from_cpu_handle(D3D12_CPU_DESCRIPTOR_HANDLE cpu_handle)
@ VKD3D_CS_OP_UPDATE_MAPPINGS
@ VKD3D_CS_OP_COPY_MAPPINGS
static struct d3d12_descriptor_heap * d3d12_desc_get_descriptor_heap(const struct d3d12_desc *descriptor)
void VKAPI_CALL vkFreeCommandBuffers(VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, const VkCommandBuffer *pCommandBuffers)
VkFlags VkPipelineStageFlags
@ VK_QUERY_CONTROL_PRECISE_BIT
@ VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL
@ VK_IMAGE_LAYOUT_PRESENT_SRC_KHR
@ VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL
@ VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL
@ VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL
@ VK_IMAGE_LAYOUT_PREINITIALIZED
@ VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL
@ VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL
@ VK_IMAGE_LAYOUT_UNDEFINED
@ VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL
@ VK_IMAGE_LAYOUT_GENERAL
@ VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL
void VKAPI_CALL vkDestroyRenderPass(VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks *pAllocator)
void VKAPI_CALL vkCmdEndQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query)
@ VK_COMMAND_BUFFER_LEVEL_PRIMARY
void VKAPI_CALL vkCmdCopyBuffer(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferCopy *pRegions)
void VKAPI_CALL vkDestroySemaphore(VkDevice device, VkSemaphore semaphore, const VkAllocationCallbacks *pAllocator)
#define VK_REMAINING_MIP_LEVELS
@ VK_SHADER_STAGE_COMPUTE_BIT
void VKAPI_CALL vkCmdBindDescriptorSets(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, const VkDescriptorSet *pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t *pDynamicOffsets)
VkResult VKAPI_CALL vkQueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo *pSubmits, VkFence fence)
void VKAPI_CALL vkCmdSetViewport(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewport *pViewports)
void VKAPI_CALL vkCmdBeginRenderPass(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo *pRenderPassBegin, VkSubpassContents contents)
VkResult VKAPI_CALL vkQueueWaitIdle(VkQueue queue)
void VKAPI_CALL vkCmdBeginQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags)
@ VK_TIME_DOMAIN_DEVICE_EXT
@ VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_EXT
@ VK_TIME_DOMAIN_CLOCK_MONOTONIC_EXT
@ VK_IMAGE_VIEW_TYPE_2D_ARRAY
@ VK_IMAGE_VIEW_TYPE_1D_ARRAY
void VKAPI_CALL vkCmdBindTransformFeedbackBuffersEXT(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer *pBuffers, const VkDeviceSize *pOffsets, const VkDeviceSize *pSizes)
void VKAPI_CALL vkCmdSetBlendConstants(VkCommandBuffer commandBuffer, const float blendConstants[4])
VkResult VKAPI_CALL vkBeginCommandBuffer(VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo *pBeginInfo)
VkResult VKAPI_CALL vkGetCalibratedTimestampsEXT(VkDevice device, uint32_t timestampCount, const VkCalibratedTimestampInfoKHR *pTimestampInfos, uint64_t *pTimestamps, uint64_t *pMaxDeviation)
@ VK_PIPELINE_BIND_POINT_GRAPHICS
@ VK_PIPELINE_BIND_POINT_COMPUTE
void VKAPI_CALL vkFreeMemory(VkDevice device, VkDeviceMemory memory, const VkAllocationCallbacks *pAllocator)
void VKAPI_CALL vkCmdResetQueryPool(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount)
void VKAPI_CALL vkCmdDrawIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride)
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)
VkResult VKAPI_CALL vkGetFenceStatus(VkDevice device, VkFence fence)
void VKAPI_CALL vkCmdDrawIndexed(VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance)
void VKAPI_CALL vkCmdEndRenderPass(VkCommandBuffer commandBuffer)
VkResult VKAPI_CALL vkAllocateCommandBuffers(VkDevice device, const VkCommandBufferAllocateInfo *pAllocateInfo, VkCommandBuffer *pCommandBuffers)
VkResult VKAPI_CALL vkEndCommandBuffer(VkCommandBuffer commandBuffer)
@ VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT
@ VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT
void VKAPI_CALL vkCmdDrawIndexedIndirectCountKHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride)
void VKAPI_CALL vkDestroyFramebuffer(VkDevice device, VkFramebuffer framebuffer, const VkAllocationCallbacks *pAllocator)
@ VK_IMAGE_ASPECT_COLOR_BIT
@ VK_IMAGE_ASPECT_STENCIL_BIT
@ VK_IMAGE_ASPECT_DEPTH_BIT
@ VK_IMAGE_USAGE_STORAGE_BIT
VkResult VKAPI_CALL vkCreateFramebuffer(VkDevice device, const VkFramebufferCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkFramebuffer *pFramebuffer)
VkResult VKAPI_CALL vkWaitForFences(VkDevice device, uint32_t fenceCount, const VkFence *pFences, VkBool32 waitAll, uint64_t timeout)
void VKAPI_CALL vkCmdSetDepthBounds(VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds)
void VKAPI_CALL vkCmdCopyBufferToImage(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkBufferImageCopy *pRegions)
void VKAPI_CALL vkCmdBindPipeline(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline)
VkFlags VkQueryControlFlags
void VKAPI_CALL vkCmdCopyImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageCopy *pRegions)
void VKAPI_CALL vkCmdDraw(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance)
void VKAPI_CALL vkCmdEndQueryIndexedEXT(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, uint32_t index)
void VKAPI_CALL vkCmdSetStencilReference(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference)
void VKAPI_CALL vkCmdDispatchIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset)
void VKAPI_CALL vkCmdBindIndexBuffer(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType)
void VKAPI_CALL vkCmdCopyImageToBuffer(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferImageCopy *pRegions)
void VKAPI_CALL vkCmdEndConditionalRenderingEXT(VkCommandBuffer commandBuffer)
@ VK_STENCIL_FRONT_AND_BACK
void VKAPI_CALL vkGetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue *pQueue)
VkResult VKAPI_CALL vkCreateSemaphore(VkDevice device, const VkSemaphoreCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSemaphore *pSemaphore)
@ VK_SEMAPHORE_TYPE_TIMELINE_KHR
void VKAPI_CALL vkCmdPushConstants(VkCommandBuffer commandBuffer, VkPipelineLayout layout, VkShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void *pValues)
VkResult VKAPI_CALL vkResetDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorPoolResetFlags flags)
void VKAPI_CALL vkCmdSetScissor(VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, const VkRect2D *pScissors)
VkResult VKAPI_CALL vkCreateRenderPass(VkDevice device, const VkRenderPassCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkRenderPass *pRenderPass)
void VKAPI_CALL vkCmdDispatch(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ)
@ VK_QUEUE_SPARSE_BINDING_BIT
@ VK_ERROR_OUT_OF_POOL_MEMORY_KHR
@ VK_ERROR_OUT_OF_HOST_MEMORY
@ VK_ERROR_FRAGMENTED_POOL
@ VK_ACCESS_HOST_READ_BIT
@ VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT
@ VK_ACCESS_TRANSFER_WRITE_BIT
@ VK_ACCESS_HOST_WRITE_BIT
@ VK_ACCESS_MEMORY_READ_BIT
@ VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT
@ VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT
@ VK_ACCESS_INDIRECT_COMMAND_READ_BIT
@ VK_ACCESS_TRANSFER_READ_BIT
@ VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT
@ VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT
@ VK_ACCESS_SHADER_WRITE_BIT
@ VK_ACCESS_SHADER_READ_BIT
@ VK_ACCESS_UNIFORM_READ_BIT
@ VK_ACCESS_INDEX_READ_BIT
@ VK_ACCESS_CONDITIONAL_RENDERING_READ_BIT_EXT
@ VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT
@ VK_ACCESS_TRANSFORM_FEEDBACK_WRITE_BIT_EXT
@ VK_ACCESS_COLOR_ATTACHMENT_READ_BIT
@ VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER
@ VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER
@ VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER
@ VK_DESCRIPTOR_TYPE_STORAGE_IMAGE
void VKAPI_CALL vkCmdBeginQueryIndexedEXT(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags, uint32_t index)
void VKAPI_CALL vkDestroyDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, const VkAllocationCallbacks *pAllocator)
VkResult VKAPI_CALL vkWaitSemaphoresKHR(VkDevice device, const VkSemaphoreWaitInfo *pWaitInfo, uint64_t timeout)
VkResult VKAPI_CALL vkResetFences(VkDevice device, uint32_t fenceCount, const VkFence *pFences)
void VKAPI_CALL vkCmdPushDescriptorSetKHR(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount, const VkWriteDescriptorSet *pDescriptorWrites)
void VKAPI_CALL vkCmdBeginConditionalRenderingEXT(VkCommandBuffer commandBuffer, const VkConditionalRenderingBeginInfoEXT *pConditionalRenderingBegin)
void VKAPI_CALL vkCmdEndTransformFeedbackEXT(VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, const VkBuffer *pCounterBuffers, const VkDeviceSize *pCounterBufferOffsets)
void VKAPI_CALL vkCmdResolveImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageResolve *pRegions)
VkResult VKAPI_CALL vkCreateFence(VkDevice device, const VkFenceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkFence *pFence)
void VKAPI_CALL vkCmdWriteTimestamp(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkQueryPool queryPool, uint32_t query)
@ VK_SUBPASS_CONTENTS_INLINE
@ VK_ATTACHMENT_LOAD_OP_CLEAR
@ VK_ATTACHMENT_LOAD_OP_DONT_CARE
void VKAPI_CALL vkCmdFillBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, uint32_t data)
@ VK_CONDITIONAL_RENDERING_INVERTED_BIT_EXT
VkResult VKAPI_CALL vkCreateDescriptorPool(VkDevice device, const VkDescriptorPoolCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDescriptorPool *pDescriptorPool)
void VKAPI_CALL vkCmdCopyQueryPoolResults(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize stride, VkQueryResultFlags flags)
@ VK_ATTACHMENT_STORE_OP_DONT_CARE
@ VK_ATTACHMENT_STORE_OP_STORE
#define VK_REMAINING_ARRAY_LAYERS
VkResult VKAPI_CALL vkResetCommandPool(VkDevice device, VkCommandPool commandPool, VkCommandPoolResetFlags flags)
void VKAPI_CALL vkCmdDrawIndexedIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride)
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_GEOMETRY_SHADER_BIT
@ VK_PIPELINE_STAGE_VERTEX_INPUT_BIT
@ VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT
@ VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT
@ VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT
@ VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT
@ VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT
@ VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT
@ VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT
@ VK_PIPELINE_STAGE_ALL_COMMANDS_BIT
@ VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT
@ VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT
@ VK_PIPELINE_STAGE_VERTEX_SHADER_BIT
@ VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT
@ VK_PIPELINE_STAGE_HOST_BIT
@ VK_PIPELINE_STAGE_TRANSFER_BIT
@ VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT
@ VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT
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)
void VKAPI_CALL vkCmdBeginTransformFeedbackEXT(VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, const VkBuffer *pCounterBuffers, const VkDeviceSize *pCounterBufferOffsets)
@ VK_QUERY_RESULT_WAIT_BIT
void VKAPI_CALL vkCmdBindVertexBuffers(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer *pBuffers, const VkDeviceSize *pOffsets)
VkResult VKAPI_CALL vkCreateCommandPool(VkDevice device, const VkCommandPoolCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkCommandPool *pCommandPool)
void VKAPI_CALL vkCmdDrawIndirectCountKHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride)
#define VK_QUEUE_FAMILY_IGNORED
@ VK_STRUCTURE_TYPE_CONDITIONAL_RENDERING_BEGIN_INFO_EXT
@ VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO
@ VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO
@ VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO_EXT
@ VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO_KHR
@ VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO
@ VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET
@ VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO
@ VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO
@ VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO
@ VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO_KHR
@ VK_STRUCTURE_TYPE_SEMAPHORE_WAIT_INFO_KHR
@ VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO
@ VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_EXT
@ VK_STRUCTURE_TYPE_FENCE_CREATE_INFO
@ VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO
@ VK_STRUCTURE_TYPE_MEMORY_BARRIER
@ VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER
@ VK_STRUCTURE_TYPE_SUBMIT_INFO
@ 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
#define DXGI_ERROR_INVALID_CALL