22#define VKD3D_NO_VULKAN_H
23#define VKD3D_NO_WIN32_TYPES
43 FIXME(
"Invalid swap effect %#x.\n", swap_effect);
58 WARN(
"Invalid swapchain format %#x for flip presentation model.\n",
format);
65 unsigned int min_buffer_count;
67 switch (
desc->SwapEffect)
81 if (
desc->SampleDesc.Count != 1 ||
desc->SampleDesc.Quality)
83 WARN(
"Invalid sample desc %u, %u for swap effect %#x.\n",
84 desc->SampleDesc.Count,
desc->SampleDesc.Quality,
desc->SwapEffect);
90 WARN(
"Invalid swap effect %u used.\n",
desc->SwapEffect);
94 if (
desc->BufferCount < min_buffer_count ||
desc->BufferCount > DXGI_MAX_SWAP_CHAIN_BUFFERS)
96 WARN(
"BufferCount is %u.\n",
desc->BufferCount);
105 unsigned int adapter_idx, output_idx;
114 WARN(
"Failed to get monitor from window.\n");
122 &output)); ++output_idx)
126 WARN(
"Adapter %u output %u: Failed to get output desc, hr %#lx.\n", adapter_idx,
128 IDXGIOutput_Release(output);
132 if (
desc.Monitor == monitor)
139 IDXGIOutput_Release(output);
145 WARN(
"Failed to enumerate outputs, hr %#lx.\n",
hr);
147 WARN(
"Output could not be found.\n");
156 if (!target_mode_desc)
158 WARN(
"Invalid pointer.\n");
165 FIXME(
"Ignoring scaling %#x.\n", target_mode_desc->
Scaling);
203 IUnknown_AddRef(iface);
219 TRACE(
"%p increasing refcount to %lu.\n", swapchain,
refcount);
232 TRACE(
"%p decreasing refcount to %lu.\n", swapchain,
refcount);
239 WARN(
"Releasing fullscreen swapchain.\n");
240 IDXGIOutput_Release(swapchain->
target);
242 IWineDXGIFactory_Release(swapchain->
factory);
244 IWineDXGIDevice_Release(
device);
305 unsigned int sync_interval,
unsigned int flags)
309 if (sync_interval > 4)
311 WARN(
"Invalid sync interval %u.\n", sync_interval);
318 if (
flags & ~DXGI_PRESENT_TEST)
320 if (
flags & DXGI_PRESENT_TEST)
322 WARN(
"Returning S_OK for DXGI_PRESENT_TEST.\n");
335 TRACE(
"iface %p, sync_interval %u, flags %#x.\n", iface, sync_interval,
flags);
348 TRACE(
"iface %p, buffer_idx %u, riid %s, surface %p\n",
373 LONG in_set_fullscreen_state;
381 WARN(
"Invalid call.\n");
387 IDXGIOutput_AddRef(
target);
389 else if (
FAILED(
hr = IDXGISwapChain4_GetContainingOutput(iface, &
target)))
391 WARN(
"Failed to get target output for swapchain, hr %#lx.\n",
hr);
400 if (in_set_fullscreen_state)
402 WARN(
"Nested invocation of SetFullscreenState.\n");
403 IDXGIOutput_Release(
target);
404 IDXGISwapChain4_GetFullscreenState(iface, &old_fs,
NULL);
416 IDXGIOutput_Release(
target);
423 IDXGIOutput_Release(
target);
428 IDXGIOutput_Release(swapchain->
target);
460 if (!swapchain->
target &&
FAILED(
hr = IDXGISwapChain4_GetContainingOutput(iface, &swapchain->
target)))
464 IDXGIOutput_AddRef(*
target);
480 TRACE(
"iface %p, desc %p.\n", iface,
desc);
484 WARN(
"Invalid pointer.\n");
492 FIXME(
"Ignoring ScanlineOrdering and Scaling.\n");
497 desc->BufferDesc.RefreshRate.Denominator = 1;
526 TRACE(
"iface %p, buffer_count %u, width %u, height %u, format %s, flags %#x.\n",
539 if (IUnknown_Release(
parent))
566 TRACE(
"iface %p, target_mode_desc %p.\n", iface, target_mode_desc);
578 TRACE(
"iface %p, output %p.\n", iface, output);
582 IDXGIOutput_AddRef(*output = swapchain->
target);
593 FIXME(
"iface %p, stats %p stub!\n", iface, stats);
599 UINT *last_present_count)
603 TRACE(
"iface %p, last_present_count %p.\n", iface, last_present_count);
617 TRACE(
"iface %p, desc %p.\n", iface,
desc);
621 WARN(
"Invalid pointer.\n");
629 FIXME(
"Ignoring Stereo, Scaling and AlphaMode.\n");
639 desc->Scaling = DXGI_SCALING_STRETCH;
653 TRACE(
"iface %p, desc %p.\n", iface,
desc);
657 WARN(
"Invalid pointer.\n");
665 FIXME(
"Ignoring ScanlineOrdering and Scaling.\n");
668 desc->RefreshRate.Denominator = 1;
680 TRACE(
"iface %p, hwnd %p.\n", iface,
hwnd);
684 WARN(
"Invalid pointer.\n");
693 REFIID iid,
void **core_window)
695 FIXME(
"iface %p, iid %s, core_window %p stub!\n", iface,
debugstr_guid(iid), core_window);
708 TRACE(
"iface %p, sync_interval %u, flags %#x, present_parameters %p.\n",
709 iface, sync_interval,
flags, present_parameters);
711 if (present_parameters)
712 FIXME(
"Ignored present parameters %p.\n", present_parameters);
719 FIXME(
"iface %p stub!\n", iface);
726 FIXME(
"iface %p, output %p stub!\n", iface, output);
730 WARN(
"Invalid pointer.\n");
740 FIXME(
"iface %p, color %p stub!\n", iface,
color);
747 FIXME(
"iface %p, color %p stub!\n", iface,
color);
754 FIXME(
"iface %p, rotation %#x stub!\n", iface, rotation);
761 FIXME(
"iface %p, rotation %p stub!\n", iface, rotation);
784 FIXME(
"iface %p, max_latency %u stub!\n", iface, max_latency);
791 FIXME(
"iface %p, max_latency %p stub!\n", iface, max_latency);
798 FIXME(
"iface %p stub!\n", iface);
806 FIXME(
"iface %p, matrix %p stub!\n", iface,
matrix);
814 FIXME(
"iface %p, matrix %p stub!\n", iface,
matrix);
823 FIXME(
"iface %p stub!\n", iface);
831 FIXME(
"iface %p, colour_space %#x, colour_space_support %p stub!\n",
832 iface, colour_space, colour_space_support);
840 FIXME(
"iface %p, colour_space %#x stub!\n", iface, colour_space);
849 FIXME(
"iface %p, buffer_count %u, width %u, height %u, format %s, flags %#x, "
850 "node_mask %p, present_queue %p stub!\n",
942 TRACE(
"parent %p, windowed %d.\n",
parent, windowed);
944 if (windowed && swapchain->
target)
946 IDXGIOutput_Release(swapchain->
target);
960 unsigned int texture_flags = 0;
965 &IID_IWineDXGIDeviceParent, (
void **)&dxgi_device_parent)))
967 ERR(
"Device should implement IWineDXGIDeviceParent.\n");
974 for (
i = 0;
i <
desc->backbuffer_count; ++
i)
978 if (
FAILED(
hr = IWineDXGIDeviceParent_register_swapchain_texture(dxgi_device_parent,
981 ERR(
"Failed to create parent swapchain texture, hr %#lx.\n",
hr);
984 IDXGISurface_Release(surface);
987 IWineDXGIDeviceParent_Release(dxgi_device_parent);
1002 &IID_IWineDXGIFactory, (
void **)&swapchain->
factory)))
1004 WARN(
"Failed to get adapter parent, hr %#lx.\n",
hr);
1007 IWineDXGIDevice_AddRef(swapchain->
device = &
device->IWineDXGIDevice_iface);
1015 if (!
desc->windowed && (!
desc->backbuffer_width || !
desc->backbuffer_height))
1016 FIXME(
"Fullscreen swapchain with back buffer width/height equal to 0 not supported properly.\n");
1023 WARN(
"Failed to create wined3d swapchain, hr %#lx.\n",
hr);
1034 ERR(
"Failed to create d3d11 textures, hr %#lx.\n",
hr);
1046 WARN(
"Failed to get target output for fullscreen swapchain, hr %#lx.\n",
hr);
1053 WARN(
"Failed to set fullscreen state, hr %#lx.\n",
hr);
1054 IDXGIOutput_Release(swapchain->
target);
1067 IWineDXGIFactory_Release(swapchain->
factory);
1068 IWineDXGIDevice_Release(swapchain->
device);
1124 FIXME(
"Unhandled VkResult %d.\n", vr);
1129#define INVALID_VK_IMAGE_INDEX (~(uint32_t)0)
1241 for (
i = 0;
i < DXGI_MAX_SWAP_CHAIN_BUFFERS; ++
i)
1286 ERR(
"Cannot sleep on condition variable, last error %ld.\n",
GetLastError());
1305 WARN(
"Unhandled format %#x.\n", vk_format);
1319 WARN(
"Unhandled format %#x.\n", vk_format);
1325 VkPhysicalDevice vk_physical_device, VkSurfaceKHR vk_surface,
1339 if (vr < 0 || !format_count)
1341 WARN(
"Failed to get supported surface formats, vr %d.\n", vr);
1349 vk_surface, &format_count,
formats)) < 0)
1351 WARN(
"Failed to enumerate supported surface formats, vr %d.\n", vr);
1356 for (
i = 0;
i < format_count; ++
i)
1361 if (
i == format_count)
1366 for (
i = 0;
i < format_count; ++
i)
1376 if (
i == format_count)
1382 TRACE(
"Using Vulkan swapchain format %#x.\n",
format);
1389 VkPhysicalDevice vk_physical_device,
uint32_t memory_type_mask,
1398 if (!(memory_type_mask & (1u <<
i)))
1403 *memory_type_index =
i;
1408 FIXME(
"Failed to find memory type (allowed types %#x).\n", memory_type_mask);
1428 WARN(
"Failed to get count of available present modes, vr %d.\n", vr);
1441 if (modes[
i] == present_mode)
1450 WARN(
"Failed to get available present modes, vr %d.\n", vr);
1460 VkDeviceSize image_offset[DXGI_MAX_SWAP_CHAIN_BUFFERS];
1461 VkDevice vk_device = swapchain->
vk_device;
1471 memset(&image_info, 0,
sizeof(image_info));
1498 WARN(
"Failed to create Vulkan image, vr %d.\n", vr);
1505 memory_type_mask = ~0
u;
1510 TRACE(
"Size %s, alignment %s, memory types %#x.\n",
1514 image_offset[
i] = (memory_size + (requirements.alignment - 1)) & ~(requirements.alignment - 1);
1515 memory_size = image_offset[
i] + requirements.size;
1524 allocate_info.allocationSize = memory_size;
1533 WARN(
"Failed to allocate device memory, vr %d.\n", vr);
1543 WARN(
"Failed to bind image memory, vr %d.\n", vr);
1566 barrier.image =
image;
1574 src_stage_mask, dst_stage_mask, 0, 0,
NULL, 0,
NULL, 1, &barrier);
1578 VkCommandBuffer vk_cmd_buffer, VkImage vk_dst_image, VkImage vk_src_image)
1594 begin_info.
flags = 0;
1599 WARN(
"Failed to begin command buffer, vr %d.\n", vr);
1648 WARN(
"Failed to end command buffer, vr %d.\n", vr);
1656 VkDevice vk_device = swapchain->
vk_device;
1672 WARN(
"Failed to create command pool, vr %d.\n", vr);
1679 allocate_info.commandPool = swapchain->
vk_cmd_pool;
1686 WARN(
"Failed to allocate command buffers, vr %d.\n", vr);
1694 semaphore_info.
flags = 0;
1700 WARN(
"Failed to create semaphore, vr %d.\n", vr);
1741 WARN(
"Failed to create vkd3d resource for Vulkan image %u, hr %#lx.\n",
i,
hr);
1746 ID3D12Resource_Release(swapchain->
buffers[
i]);
1755 VkDevice vk_device = swapchain->
vk_device;
1756 VkFence vk_fence = swapchain->
vk_fence;
1764 WARN(
"Failed to acquire next Vulkan image, vr %d.\n", vr);
1770 ERR(
"Failed to wait for fence, vr %d.\n", vr);
1774 ERR(
"Failed to reset fence, vr %d.\n", vr);
1835 VkDevice vk_device = swapchain->
vk_device;
1839 VkSwapchainKHR vk_swapchain;
1851 WARN(
"Failed to get surface capabilities, vr %d.\n", vr);
1875 WARN(
"Swapchain dimensions %ux%u are not supported (%u-%u x %u-%u).\n",
1885 FIXME(
"Unsupported alpha mode.\n");
1893 WARN(
"Transfer not supported for swapchain images.\n");
1898 WARN(
"Sampling not supported for swapchain images.\n");
1903 vk_swapchain_desc.
flags = 0;
1904 vk_swapchain_desc.surface = swapchain->
vk_surface;
1906 vk_swapchain_desc.
imageFormat = vk_swapchain_format;
1919 vk_swapchain_desc.oldSwapchain = swapchain->
vk_swapchain;
1922 WARN(
"Failed to create Vulkan swapchain, vr %d.\n", vr);
1931 WARN(
"Failed to get Vulkan swapchain images, vr %d.\n", vr);
1936 FIXME(
"Unsupported Vulkan swapchain image count %u.\n", image_count);
1943 WARN(
"Failed to get Vulkan swapchain images, vr %d.\n", vr);
2002 IUnknown_AddRef(iface);
2018 TRACE(
"%p increasing refcount to %lu.\n", swapchain,
refcount);
2038 ERR(
"Failed to wait for worker thread, return value %ld.\n",
ret);
2041 ERR(
"Failed to close worker thread, last error %ld.\n",
GetLastError());
2079 WARN(
"Destroying fullscreen swapchain.\n");
2080 IDXGIOutput_Release(swapchain->
target);
2084 ID3D12Device_Release(swapchain->
device);
2087 IWineDXGIFactory_Release(swapchain->
factory);
2099 TRACE(
"%p decreasing refcount to %lu.\n", swapchain,
refcount);
2148 return IWineDXGIFactory_QueryInterface(swapchain->
factory, iid,
parent);
2159 return ID3D12Device_QueryInterface(swapchain->
device, iid,
device);
2165 unsigned int sync_interval)
2169 switch (sync_interval)
2175 FIXME(
"Unsupported sync interval %u.\n", sync_interval);
2200 VkCommandBuffer vk_cmd_buffer;
2202 VkImage vk_dst_image;
2220 ERR(
"Failed to reset command buffer, vr %d.\n", vr);
2225 vk_cmd_buffer, vk_dst_image, vk_src_image)) < 0 )
2230 ERR(
"Failed to wait for present event, hr %#lx.\n",
hr);
2248 ERR(
"Failed to blit swapchain buffer, vr %d.\n", vr);
2281 TRACE(
"Recreating Vulkan swapchain.\n");
2288 ERR(
"Failed to present after recreating swapchain, vr %d.\n", vr);
2293 ERR(
"Failed to queue present, vr %d.\n", vr);
2301 uint64_t number =
op->present.frame_number + DXGI_MAX_SWAP_CHAIN_BUFFERS + 1;
2306 ERR(
"Failed to signal frame latency fence, hr %#lx.\n",
hr);
2315 unsigned int sync_interval,
unsigned int flags)
2318 HANDLE frame_latency_event;
2327 if (
flags & ~DXGI_PRESENT_TEST)
2329 if (
flags & DXGI_PRESENT_TEST)
2331 WARN(
"Returning S_OK for DXGI_PRESENT_TEST.\n");
2337 WARN(
"Cannot allocate memory.\n");
2361 ERR(
"Failed to enqueue frame latency event, hr %#lx.\n",
hr);
2369 ERR(
"Failed to signal present fence, hf %#lx.\n",
hr);
2381 TRACE(
"iface %p, sync_interval %u, flags %#x.\n", iface, sync_interval,
flags);
2391 TRACE(
"iface %p, buffer_idx %u, iid %s, surface %p.\n",
2396 WARN(
"Invalid buffer index %u.\n", buffer_idx);
2401 return ID3D12Resource_QueryInterface(swapchain->
buffers[buffer_idx], iid, surface);
2412 LONG in_set_fullscreen_state;
2420 WARN(
"Invalid call.\n");
2426 IDXGIOutput_AddRef(
target);
2428 else if (
FAILED(
hr = IDXGISwapChain4_GetContainingOutput(iface, &
target)))
2430 WARN(
"Failed to get target output for swapchain, hr %#lx.\n",
hr);
2437 IDXGIOutput_Release(
target);
2442 if (in_set_fullscreen_state)
2444 WARN(
"Nested invocation of SetFullscreenState.\n");
2445 IDXGIOutput_Release(
target);
2446 IDXGISwapChain4_GetFullscreenState(iface, &old_fs,
NULL);
2455 IDXGIOutput_Release(
target);
2463 IDXGIOutput_Release(
target);
2468 IDXGIOutput_Release(swapchain->
target);
2500 if (!swapchain->
target &&
FAILED(
hr = IDXGISwapChain4_GetContainingOutput(iface,
2505 IDXGIOutput_AddRef(*
target);
2523 TRACE(
"iface %p, desc %p.\n", iface,
desc);
2527 WARN(
"Invalid pointer.\n");
2535 desc->BufferDesc.Width = swapchain_desc->
Width;
2536 desc->BufferDesc.Height = swapchain_desc->
Height;
2538 desc->BufferDesc.Format = swapchain_desc->
Format;
2545 desc->Windowed = windowed;
2574 ID3D12Resource_AddRef(swapchain->
buffers[
i]);
2575 if ((refcount = ID3D12Resource_Release(swapchain->
buffers[
i])))
2577 WARN(
"Buffer %p has %lu references left.\n", swapchain->
buffers[
i], refcount);
2583 new_desc = swapchain->
desc;
2620 WARN(
"Cannot allocate memory.\n");
2625 op->resize_buffers.vk_memory = swapchain->
vk_memory;
2629 op->resize_buffers.desc = new_desc;
2640 swapchain->
desc = new_desc;
2650 TRACE(
"iface %p, buffer_count %u, width %u, height %u, format %s, flags %#x.\n",
2661 TRACE(
"iface %p, target_mode_desc %p.\n", iface, target_mode_desc);
2675 TRACE(
"iface %p, output %p.\n", iface, output);
2679 IDXGIOutput_AddRef(*output = swapchain->
target);
2685 if (
FAILED(
hr = IUnknown_QueryInterface(device_parent, &IID_IDXGIAdapter, (
void **)&
adapter)))
2687 WARN(
"Failed to get adapter, hr %#lx.\n",
hr);
2693 WARN(
"Failed to get factory, hr %#lx.\n",
hr);
2694 IDXGIAdapter_Release(
adapter);
2699 IWineDXGIFactory_Release(
factory);
2700 IDXGIAdapter_Release(
adapter);
2707 FIXME(
"iface %p, stats %p stub!\n", iface, stats);
2713 UINT *last_present_count)
2717 TRACE(
"iface %p, last_present_count %p.\n", iface, last_present_count);
2730 TRACE(
"iface %p, desc %p.\n", iface,
desc);
2734 WARN(
"Invalid pointer.\n");
2748 TRACE(
"iface %p, desc %p.\n", iface,
desc);
2752 WARN(
"Invalid pointer.\n");
2761 desc->Windowed = windowed;
2769 TRACE(
"iface %p, hwnd %p.\n", iface,
hwnd);
2773 WARN(
"Invalid pointer.\n");
2782 REFIID iid,
void **core_window)
2784 FIXME(
"iface %p, iid %s, core_window %p stub!\n", iface,
debugstr_guid(iid), core_window);
2787 *core_window =
NULL;
2797 TRACE(
"iface %p, sync_interval %u, flags %#x, present_parameters %p.\n",
2798 iface, sync_interval,
flags, present_parameters);
2800 if (present_parameters)
2801 FIXME(
"Ignored present parameters %p.\n", present_parameters);
2808 FIXME(
"iface %p stub!\n", iface);
2815 FIXME(
"iface %p, output %p stub!\n", iface, output);
2819 WARN(
"Invalid pointer.\n");
2829 FIXME(
"iface %p, color %p stub!\n", iface,
color);
2836 FIXME(
"iface %p, color %p stub!\n", iface,
color);
2843 FIXME(
"iface %p, rotation %#x stub!\n", iface, rotation);
2850 FIXME(
"iface %p, rotation %p stub!\n", iface, rotation);
2875 TRACE(
"iface %p, max_latency %u.\n", iface, max_latency);
2879 WARN(
"DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT not set for swap chain %p.\n", iface);
2885 WARN(
"Invalid maximum frame latency %u.\n", max_latency);
2897 TRACE(
"iface %p, max_latency %p.\n", iface, max_latency);
2901 WARN(
"DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT not set for swap chain %p.\n", iface);
2915 TRACE(
"iface %p.\n", iface);
2935 FIXME(
"iface %p, matrix %p stub!\n", iface,
matrix);
2943 FIXME(
"iface %p, matrix %p stub!\n", iface,
matrix);
2954 TRACE(
"iface %p.\n", iface);
2964 UINT support_flags = 0;
2966 FIXME(
"iface %p, colour_space %#x, colour_space_support %p semi-stub!\n",
2967 iface, colour_space, colour_space_support);
2969 if (!colour_space_support)
2975 *colour_space_support = support_flags;
2982 FIXME(
"iface %p, colour_space %#x semi-stub!\n", iface, colour_space);
2986 WARN(
"Colour space %u not supported.\n", colour_space);
2995 const UINT *node_mask,
IUnknown *
const *present_queue)
3000 TRACE(
"iface %p, buffer_count %u, width %u, height %u, format %s, flags %#x, "
3001 "node_mask %p, present_queue %p.\n",
3004 if (!node_mask || !present_queue)
3010 if (node_mask[
i] > 1 || !present_queue[
i])
3012 if ((ID3D12CommandQueue*)present_queue[
i] != swapchain->
command_queue)
3013 FIXME(
"Ignoring present queue %p.\n", present_queue[
i]);
3090 ERR_(winediag)(
"Failed to load Vulkan.\n");
3096#define LOAD_INSTANCE_PFN(name) \
3097 if (!(dxgi->p_##name = (void *)vkGetInstanceProcAddr(vk_instance, #name))) \
3099 ERR("Failed to get instance proc "#name".\n"); \
3100 FreeLibrary(dxgi->vulkan_module); \
3111#undef LOAD_INSTANCE_PFN
3113#define LOAD_DEVICE_PFN(name) \
3114 if (!(dxgi->p_##name = (void *)vkGetDeviceProcAddr(vk_device, #name))) \
3116 ERR("Failed to get device proc "#name".\n"); \
3117 FreeLibrary(dxgi->vulkan_module); \
3147#undef LOAD_DEVICE_PFN
3162 TRACE(
"parent %p, windowed %d.\n",
parent, windowed);
3164 if (windowed && swapchain->
target)
3166 IDXGIOutput_Release(swapchain->
target);
3183 VkPhysicalDevice vk_physical_device;
3187 VkSurfaceKHR vk_surface;
3188 VkInstance vk_instance;
3199 WARN(
"D3D12 swapchain cannot be created on desktop window.\n");
3208 swapchain->
desc = *swapchain_desc;
3227 WARN(
"Failed to get output from window %p, hr %#lx.\n",
window,
hr);
3235 IDXGIOutput_Release(output);
3246 IDXGIOutput_Release(output);
3259 IDXGIOutput_Release(output);
3263 swapchain->
target = output;
3267 IDXGIOutput_Release(output);
3273 FIXME(
"Ignoring scaling %#x.\n", swapchain_desc->
Scaling);
3277 FIXME(
"Ignoring swapchain flags %#x.\n", swapchain_desc->
Flags);
3280 FIXME(
"Ignoring refresh rate.\n");
3284 FIXME(
"Unhandled mode scaling %#x.\n", fullscreen_desc->
Scaling);
3308 surface_desc.pNext =
NULL;
3309 surface_desc.flags = 0;
3311 surface_desc.hwnd =
window;
3314 WARN(
"Failed to create Vulkan surface, vr %d.\n", vr);
3322 queue_family_index, vk_surface, &supported)) < 0 || !supported)
3324 FIXME(
"Queue family does not support presentation, vr %d.\n", vr);
3346 fence_desc.
flags = 0;
3349 WARN(
"Failed to create Vulkan fence, vr %d.\n", vr);
3361 if (
FAILED(
hr = ID3D12Device_CreateFence(
device, DXGI_MAX_SWAP_CHAIN_BUFFERS,
3364 WARN(
"Failed to create frame latency fence, hr %#lx.\n",
hr);
3372 WARN(
"Failed to create frame latency event, hr %#lx.\n",
hr);
3381 WARN(
"Failed to create present fence, hr %#lx.\n",
hr);
3391 WARN(
"Failed to create worker thread, hr %#lx.\n",
hr);
3418 memset(&default_fullscreen_desc, 0,
sizeof(default_fullscreen_desc));
3423 if (!(
object =
calloc(1,
sizeof(*
object))))
3426 if (
FAILED(
hr = ID3D12CommandQueue_GetDevice(
queue, &IID_ID3D12Device, (
void **)&
device)))
3428 ERR(
"Failed to get d3d12 device, hr %#lx.\n",
hr);
3434 ID3D12Device_Release(
device);
3441 TRACE(
"Created swapchain %p.\n",
object);
#define DECLSPEC_HOTPATCH
#define InterlockedIncrement
#define InterlockedExchange
#define InterlockedDecrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static void list_remove(struct list_entry *entry)
static int list_empty(struct list_entry *head)
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
static void list_init(struct list_entry *head)
#define STDMETHODCALLTYPE
const char * debug_dxgi_format(DXGI_FORMAT format)
enum wined3d_format_id wined3dformat_from_dxgi_format(DXGI_FORMAT format)
DXGI_FORMAT dxgi_format_from_wined3dformat(enum wined3d_format_id format)
@ D3D12_RESOURCE_STATE_COPY_SOURCE
@ D3D12_COMMAND_LIST_TYPE_DIRECT
@ D3D12_RESOURCE_DIMENSION_TEXTURE2D
@ D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET
@ D3D12_TEXTURE_LAYOUT_UNKNOWN
static HMODULE vulkan_module
static const struct pixel_format_desc formats[]
void *CDECL wined3d_texture_get_parent(const struct wined3d_texture *texture)
#define GetProcAddress(x, y)
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
#define GetCurrentProcess()
#define WINE_DECLARE_DEBUG_CHANNEL(x)
static void cleanup(void)
BOOL WINAPI DuplicateHandle(IN HANDLE hSourceProcessHandle, IN HANDLE hSourceHandle, IN HANDLE hTargetProcessHandle, OUT LPHANDLE lpTargetHandle, IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN DWORD dwOptions)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
BOOL WINAPI SleepConditionVariableCS(PCONDITION_VARIABLE ConditionVariable, PCRITICAL_SECTION CriticalSection, DWORD Timeout)
VOID WINAPI WakeAllConditionVariable(PCONDITION_VARIABLE ConditionVariable)
VOID WINAPI InitializeConditionVariable(PCONDITION_VARIABLE ConditionVariable)
@ DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG_PRESENT
static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetDevice(IDXGISwapChain4 *iface, REFIID iid, void **device)
static HRESULT d3d12_swapchain_create_user_buffers(struct d3d12_swapchain *swapchain)
static const struct wined3d_parent_ops d3d11_swapchain_wined3d_parent_ops
static HRESULT STDMETHODCALLTYPE d3d12_swapchain_QueryInterface(IDXGISwapChain4 *iface, REFIID iid, void **object)
static HANDLE STDMETHODCALLTYPE d3d12_swapchain_GetFrameLatencyWaitableObject(IDXGISwapChain4 *iface)
static HRESULT d3d12_swapchain_create_d3d12_resources(struct d3d12_swapchain *swapchain)
static const struct wined3d_swapchain_state_parent_ops d3d11_swapchain_state_parent_ops
static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetHwnd(IDXGISwapChain4 *iface, HWND *hwnd)
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetBackgroundColor(IDXGISwapChain4 *iface, DXGI_RGBA *color)
static BOOL d3d12_swapchain_is_present_mode_supported(struct d3d12_swapchain *swapchain, VkPresentModeKHR present_mode)
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_SetMaximumFrameLatency(IDXGISwapChain4 *iface, UINT max_latency)
HRESULT d3d12_swapchain_create(IWineDXGIFactory *factory, ID3D12CommandQueue *queue, HWND window, const DXGI_SWAP_CHAIN_DESC1 *swapchain_desc, const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *fullscreen_desc, IDXGISwapChain1 **swapchain)
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_SetPrivateData(IDXGISwapChain4 *iface, REFGUID guid, UINT data_size, const void *data)
static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetPrivateData(IDXGISwapChain4 *iface, REFGUID guid, UINT *data_size, void *data)
static HRESULT STDMETHODCALLTYPE d3d12_swapchain_SetColorSpace1(IDXGISwapChain4 *iface, DXGI_COLOR_SPACE_TYPE colour_space)
HRESULT dxgi_get_output_from_window(IWineDXGIFactory *factory, HWND window, IDXGIOutput **dxgi_output)
static const struct IDXGISwapChain4Vtbl d3d12_swapchain_vtbl
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_ResizeBuffers1(IDXGISwapChain4 *iface, UINT buffer_count, UINT width, UINT height, DXGI_FORMAT format, UINT flags, const UINT *node_mask, IUnknown *const *present_queue)
static HRESULT STDMETHODCALLTYPE d3d12_swapchain_SetBackgroundColor(IDXGISwapChain4 *iface, const DXGI_RGBA *color)
static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetFrameStatistics(IDXGISwapChain4 *iface, DXGI_FRAME_STATISTICS *stats)
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_SetMatrixTransform(IDXGISwapChain4 *iface, const DXGI_MATRIX_3X2_F *matrix)
static HRESULT d3d12_swapchain_create_image_resources(struct d3d12_swapchain *swapchain)
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetDevice(IDXGISwapChain4 *iface, REFIID riid, void **device)
static HRESULT d3d12_swapchain_resize_buffers(struct d3d12_swapchain *swapchain, UINT buffer_count, UINT width, UINT height, DXGI_FORMAT format, UINT flags)
static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetFullscreenState(IDXGISwapChain4 *iface, BOOL *fullscreen, IDXGIOutput **target)
static DXGI_SWAP_EFFECT dxgi_swap_effect_from_wined3d(enum wined3d_swap_effect swap_effect)
static BOOL dxgi_validate_flip_swap_effect_format(DXGI_FORMAT format)
static ULONG STDMETHODCALLTYPE d3d11_swapchain_AddRef(IDXGISwapChain4 *iface)
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetRestrictToOutput(IDXGISwapChain4 *iface, IDXGIOutput **output)
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_SetRotation(IDXGISwapChain4 *iface, DXGI_MODE_ROTATION rotation)
static struct d3d12_swapchain * d3d12_swapchain_from_IDXGISwapChain4(IDXGISwapChain4 *iface)
static HRESULT d3d12_swapchain_op_resize_buffers_execute(struct d3d12_swapchain *swapchain, struct d3d12_swapchain_op *op)
#define LOAD_DEVICE_PFN(name)
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_SetSourceSize(IDXGISwapChain4 *iface, UINT width, UINT height)
static ULONG STDMETHODCALLTYPE d3d12_swapchain_Release(IDXGISwapChain4 *iface)
static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetRotation(IDXGISwapChain4 *iface, DXGI_MODE_ROTATION *rotation)
static HRESULT STDMETHODCALLTYPE DECLSPEC_HOTPATCH d3d11_swapchain_SetFullscreenState(IDXGISwapChain4 *iface, BOOL fullscreen, IDXGIOutput *target)
static HWND d3d11_swapchain_get_hwnd(struct d3d11_swapchain *swapchain)
static ULONG STDMETHODCALLTYPE d3d11_swapchain_Release(IDXGISwapChain4 *iface)
static BOOL STDMETHODCALLTYPE d3d12_swapchain_IsTemporaryMonoSupported(IDXGISwapChain4 *iface)
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetBuffer(IDXGISwapChain4 *iface, UINT buffer_idx, REFIID riid, void **surface)
static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetContainingOutput(IDXGISwapChain4 *iface, IDXGIOutput **output)
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_QueryInterface(IDXGISwapChain4 *iface, REFIID riid, void **object)
static HRESULT STDMETHODCALLTYPE d3d12_swapchain_SetPrivateDataInterface(IDXGISwapChain4 *iface, REFGUID guid, const IUnknown *object)
static void d3d12_swapchain_op_destroy(struct d3d12_swapchain *swapchain, struct d3d12_swapchain_op *op)
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetFullscreenDesc(IDXGISwapChain4 *iface, DXGI_SWAP_CHAIN_FULLSCREEN_DESC *desc)
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetHwnd(IDXGISwapChain4 *iface, HWND *hwnd)
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_ResizeTarget(IDXGISwapChain4 *iface, const DXGI_MODE_DESC *target_mode_desc)
static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetDesc1(IDXGISwapChain4 *iface, DXGI_SWAP_CHAIN_DESC1 *desc)
static HRESULT STDMETHODCALLTYPE d3d12_swapchain_CheckColorSpaceSupport(IDXGISwapChain4 *iface, DXGI_COLOR_SPACE_TYPE colour_space, UINT *colour_space_support)
static HRESULT d3d12_swapchain_present(struct d3d12_swapchain *swapchain, unsigned int sync_interval, unsigned int flags)
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_CheckColorSpaceSupport(IDXGISwapChain4 *iface, DXGI_COLOR_SPACE_TYPE colour_space, UINT *colour_space_support)
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetMatrixTransform(IDXGISwapChain4 *iface, DXGI_MATRIX_3X2_F *matrix)
static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetParent(IDXGISwapChain4 *iface, REFIID iid, void **parent)
static HRESULT d3d12_swapchain_create_command_buffers(struct d3d12_swapchain *swapchain)
static VkResult d3d12_swapchain_acquire_next_vulkan_image(struct d3d12_swapchain *swapchain)
static HANDLE STDMETHODCALLTYPE d3d11_swapchain_GetFrameLatencyWaitableObject(IDXGISwapChain4 *iface)
static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetLastPresentCount(IDXGISwapChain4 *iface, UINT *last_present_count)
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetDesc(IDXGISwapChain4 *iface, DXGI_SWAP_CHAIN_DESC *desc)
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_SetPrivateDataInterface(IDXGISwapChain4 *iface, REFGUID guid, const IUnknown *object)
static void CDECL d3d11_swapchain_windowed_state_changed(struct wined3d_swapchain_state_parent *parent, BOOL windowed)
static void d3d12_swapchain_destroy_vulkan_resources(struct d3d12_swapchain *swapchain)
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_SetBackgroundColor(IDXGISwapChain4 *iface, const DXGI_RGBA *color)
static HRESULT select_vk_format(const struct dxgi_vk_funcs *vk_funcs, VkPhysicalDevice vk_physical_device, VkSurfaceKHR vk_surface, const DXGI_SWAP_CHAIN_DESC1 *swapchain_desc, VkFormat *vk_format)
static HRESULT STDMETHODCALLTYPE d3d12_swapchain_SetMatrixTransform(IDXGISwapChain4 *iface, const DXGI_MATRIX_3X2_F *matrix)
static HRESULT STDMETHODCALLTYPE d3d12_swapchain_ResizeBuffers1(IDXGISwapChain4 *iface, UINT buffer_count, UINT width, UINT height, DXGI_FORMAT format, UINT flags, const UINT *node_mask, IUnknown *const *present_queue)
static HRESULT STDMETHODCALLTYPE d3d12_swapchain_SetRotation(IDXGISwapChain4 *iface, DXGI_MODE_ROTATION rotation)
static HRESULT d3d12_swapchain_create_vulkan_swapchain(struct d3d12_swapchain *swapchain)
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetRotation(IDXGISwapChain4 *iface, DXGI_MODE_ROTATION *rotation)
static void d3d12_swapchain_destroy_d3d12_resources(struct d3d12_swapchain *swapchain)
static const struct wined3d_swapchain_state_parent_ops d3d12_swapchain_state_parent_ops
static VkFormat get_swapchain_fallback_format(VkFormat vk_format)
static HRESULT hresult_from_vk_result(VkResult vr)
static HRESULT d3d12_swapchain_op_present_execute(struct d3d12_swapchain *swapchain, struct d3d12_swapchain_op *op)
static ULONG STDMETHODCALLTYPE d3d12_swapchain_AddRef(IDXGISwapChain4 *iface)
BOOL dxgi_validate_swapchain_desc(const DXGI_SWAP_CHAIN_DESC1 *desc)
static HRESULT dxgi_swapchain_resize_target(struct wined3d_swapchain_state *state, const DXGI_MODE_DESC *target_mode_desc)
static DWORD WINAPI d3d12_swapchain_worker_proc(void *data)
static void CDECL d3d12_swapchain_windowed_state_changed(struct wined3d_swapchain_state_parent *parent, BOOL windowed)
static HRESULT d3d12_swapchain_create_vulkan_resources(struct d3d12_swapchain *swapchain)
static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetBuffer(IDXGISwapChain4 *iface, UINT buffer_idx, REFIID iid, void **surface)
static struct d3d11_swapchain * d3d11_swapchain_from_IDXGISwapChain4(IDXGISwapChain4 *iface)
static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetMatrixTransform(IDXGISwapChain4 *iface, DXGI_MATRIX_3X2_F *matrix)
@ D3D12_SWAPCHAIN_OP_PRESENT
@ D3D12_SWAPCHAIN_OP_RESIZE_BUFFERS
static struct d3d12_swapchain * d3d12_swapchain_from_wined3d_swapchain_state_parent(struct wined3d_swapchain_state_parent *parent)
static HRESULT d3d11_swapchain_create_d3d11_textures(struct d3d11_swapchain *swapchain, IWineDXGIDevice *device, struct wined3d_swapchain_desc *desc)
static BOOL STDMETHODCALLTYPE d3d11_swapchain_IsTemporaryMonoSupported(IDXGISwapChain4 *iface)
static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetRestrictToOutput(IDXGISwapChain4 *iface, IDXGIOutput **output)
static HRESULT STDMETHODCALLTYPE DECLSPEC_HOTPATCH d3d11_swapchain_Present(IDXGISwapChain4 *iface, UINT sync_interval, UINT flags)
static void d3d12_swapchain_destroy(struct d3d12_swapchain *swapchain)
static void vk_cmd_image_barrier(const struct dxgi_vk_funcs *vk_funcs, VkCommandBuffer cmd_buffer, VkPipelineStageFlags src_stage_mask, VkPipelineStageFlags dst_stage_mask, VkAccessFlags src_access_mask, VkAccessFlags dst_access_mask, VkImageLayout old_layout, VkImageLayout new_layout, VkImage image)
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetDesc1(IDXGISwapChain4 *iface, DXGI_SWAP_CHAIN_DESC1 *desc)
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_ResizeBuffers(IDXGISwapChain4 *iface, UINT buffer_count, UINT width, UINT height, DXGI_FORMAT format, UINT flags)
HRESULT d3d11_swapchain_init(struct d3d11_swapchain *swapchain, struct dxgi_device *device, struct wined3d_swapchain_desc *desc)
static DXGI_FORMAT dxgi_format_from_vk_format(VkFormat vk_format)
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetContainingOutput(IDXGISwapChain4 *iface, IDXGIOutput **output)
#define INVALID_VK_IMAGE_INDEX
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetMaximumFrameLatency(IDXGISwapChain4 *iface, UINT *max_latency)
static BOOL init_vk_funcs(struct dxgi_vk_funcs *dxgi, VkInstance vk_instance, VkDevice vk_device)
static HRESULT STDMETHODCALLTYPE d3d12_swapchain_Present1(IDXGISwapChain4 *iface, UINT sync_interval, UINT flags, const DXGI_PRESENT_PARAMETERS *present_parameters)
static HRESULT d3d11_swapchain_present(struct d3d11_swapchain *swapchain, unsigned int sync_interval, unsigned int flags)
static const struct IDXGISwapChain4Vtbl d3d11_swapchain_vtbl
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetParent(IDXGISwapChain4 *iface, REFIID riid, void **parent)
static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetSourceSize(IDXGISwapChain4 *iface, UINT *width, UINT *height)
static VkResult d3d12_swapchain_record_swapchain_blit(struct d3d12_swapchain *swapchain, VkCommandBuffer vk_cmd_buffer, VkImage vk_dst_image, VkImage vk_src_image)
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetLastPresentCount(IDXGISwapChain4 *iface, UINT *last_present_count)
static HRESULT d3d12_swapchain_init(struct d3d12_swapchain *swapchain, IWineDXGIFactory *factory, ID3D12Device *device, ID3D12CommandQueue *queue, HWND window, const DXGI_SWAP_CHAIN_DESC1 *swapchain_desc, const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *fullscreen_desc)
static HRESULT STDMETHODCALLTYPE d3d12_swapchain_SetSourceSize(IDXGISwapChain4 *iface, UINT width, UINT height)
static void STDMETHODCALLTYPE d3d11_swapchain_wined3d_object_released(void *parent)
static HRESULT STDMETHODCALLTYPE d3d12_swapchain_Present(IDXGISwapChain4 *iface, UINT sync_interval, UINT flags)
static HRESULT STDMETHODCALLTYPE d3d12_swapchain_SetHDRMetaData(IDXGISwapChain4 *iface, DXGI_HDR_METADATA_TYPE type, UINT size, void *metadata)
static VkResult d3d12_swapchain_queue_present(struct d3d12_swapchain *swapchain, VkImage vk_src_image, uint64_t frame_number)
static HRESULT STDMETHODCALLTYPE d3d12_swapchain_ResizeBuffers(IDXGISwapChain4 *iface, UINT buffer_count, UINT width, UINT height, DXGI_FORMAT format, UINT flags)
static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetCoreWindow(IDXGISwapChain4 *iface, REFIID iid, void **core_window)
static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetFullscreenDesc(IDXGISwapChain4 *iface, DXGI_SWAP_CHAIN_FULLSCREEN_DESC *desc)
static HRESULT STDMETHODCALLTYPE d3d12_swapchain_SetMaximumFrameLatency(IDXGISwapChain4 *iface, UINT max_latency)
static HRESULT d3d12_swapchain_set_sync_interval(struct d3d12_swapchain *swapchain, unsigned int sync_interval)
static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetDesc(IDXGISwapChain4 *iface, DXGI_SWAP_CHAIN_DESC *desc)
static HRESULT STDMETHODCALLTYPE d3d12_swapchain_ResizeTarget(IDXGISwapChain4 *iface, const DXGI_MODE_DESC *target_mode_desc)
static UINT STDMETHODCALLTYPE d3d11_swapchain_GetCurrentBackBufferIndex(IDXGISwapChain4 *iface)
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetFullscreenState(IDXGISwapChain4 *iface, BOOL *fullscreen, IDXGIOutput **target)
static HRESULT STDMETHODCALLTYPE d3d12_swapchain_SetPrivateData(IDXGISwapChain4 *iface, REFGUID guid, UINT data_size, const void *data)
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetSourceSize(IDXGISwapChain4 *iface, UINT *width, UINT *height)
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetPrivateData(IDXGISwapChain4 *iface, REFGUID guid, UINT *data_size, void *data)
static HRESULT vk_select_memory_type(const struct dxgi_vk_funcs *vk_funcs, VkPhysicalDevice vk_physical_device, uint32_t memory_type_mask, VkMemoryPropertyFlags flags, uint32_t *memory_type_index)
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetCoreWindow(IDXGISwapChain4 *iface, REFIID iid, void **core_window)
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_SetColorSpace1(IDXGISwapChain4 *iface, DXGI_COLOR_SPACE_TYPE colour_space)
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_Present1(IDXGISwapChain4 *iface, UINT sync_interval, UINT flags, const DXGI_PRESENT_PARAMETERS *present_parameters)
#define LOAD_INSTANCE_PFN(name)
static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetMaximumFrameLatency(IDXGISwapChain4 *iface, UINT *max_latency)
static UINT STDMETHODCALLTYPE d3d12_swapchain_GetCurrentBackBufferIndex(IDXGISwapChain4 *iface)
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_SetHDRMetaData(IDXGISwapChain4 *iface, DXGI_HDR_METADATA_TYPE type, UINT size, void *metadata)
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetFrameStatistics(IDXGISwapChain4 *iface, DXGI_FRAME_STATISTICS *stats)
static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetBackgroundColor(IDXGISwapChain4 *iface, DXGI_RGBA *color)
static struct d3d11_swapchain * d3d11_swapchain_from_wined3d_swapchain_state_parent(struct wined3d_swapchain_state_parent *parent)
static HRESULT STDMETHODCALLTYPE DECLSPEC_HOTPATCH d3d12_swapchain_SetFullscreenState(IDXGISwapChain4 *iface, BOOL fullscreen, IDXGIOutput *target)
@ DXGI_SWAP_EFFECT_SEQUENTIAL
@ DXGI_SWAP_EFFECT_DISCARD
@ DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL
@ DXGI_SWAP_EFFECT_FLIP_DISCARD
@ DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT
const DXGI_USAGE DXGI_USAGE_RENDER_TARGET_OUTPUT
const DXGI_USAGE DXGI_USAGE_SHADER_INPUT
struct dxgi_factory * unsafe_impl_from_IDXGIFactory(IDXGIFactory *iface)
HRESULT wined3d_swapchain_desc_from_dxgi(struct wined3d_swapchain_desc *wined3d_desc, IDXGIOutput *dxgi_containing_output, HWND window, const DXGI_SWAP_CHAIN_DESC1 *dxgi_desc, const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *dxgi_fullscreen_desc)
HRESULT dxgi_get_private_data(struct wined3d_private_store *store, REFGUID guid, UINT *data_size, void *data)
unsigned int dxgi_swapchain_flags_from_wined3d(unsigned int wined3d_flags)
void dxgi_sample_desc_from_wined3d(DXGI_SAMPLE_DESC *desc, enum wined3d_multisample_type wined3d_type, unsigned int wined3d_quality)
DXGI_USAGE dxgi_usage_from_wined3d_bind_flags(unsigned int wined3d_bind_flags)
HRESULT dxgi_set_private_data(struct wined3d_private_store *store, REFGUID guid, UINT data_size, const void *data)
void wined3d_display_mode_from_dxgi(struct wined3d_display_mode *wined3d_mode, const DXGI_MODE_DESC *mode)
HRESULT dxgi_set_private_data_interface(struct wined3d_private_store *store, REFGUID guid, const IUnknown *object)
struct dxgi_output * unsafe_impl_from_IDXGIOutput(IDXGIOutput *iface)
const char * debug_dxgi_mode(const DXGI_MODE_DESC *desc)
@ DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
@ DXGI_MODE_SCALING_UNSPECIFIED
@ DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED
GLuint GLuint GLsizei count
GLint GLint GLsizei GLsizei height
GLuint GLuint GLsizei GLenum type
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLint GLint GLsizei width
GLsizeiptr const GLvoid GLenum usage
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
#define memcpy(s1, s2, n)
D3D11_SHADER_VARIABLE_DESC desc
static unsigned int number
static IHTMLWindow2 * window
HMONITOR WINAPI MonitorFromWindow(HWND, DWORD)
#define IsEqualGUID(rguid1, rguid2)
BOOL WINAPI IsIconic(_In_ HWND)
HWND WINAPI GetDesktopWindow(void)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
D3D12_RESOURCE_DIMENSION Dimension
D3D12_TEXTURE_LAYOUT Layout
DXGI_SAMPLE_DESC SampleDesc
D3D12_RESOURCE_FLAGS Flags
DXGI_MODE_SCALING Scaling
DXGI_ALPHA_MODE AlphaMode
DXGI_SWAP_EFFECT SwapEffect
DXGI_SAMPLE_DESC SampleDesc
DXGI_MODE_SCANLINE_ORDER ScanlineOrdering
DXGI_RATIONAL RefreshRate
DXGI_MODE_SCALING Scaling
uint32_t commandBufferCount
VkCommandBufferLevel level
const VkCommandBufferInheritanceInfo * pInheritanceInfo
VkCommandBufferUsageFlags flags
uint32_t queueFamilyIndex
VkCommandPoolCreateFlags flags
VkImageSubresourceLayers srcSubresource
VkImageSubresourceLayers dstSubresource
VkSharingMode sharingMode
VkImageLayout initialLayout
const uint32_t * pQueueFamilyIndices
VkSampleCountFlagBits samples
uint32_t queueFamilyIndexCount
VkAccessFlags dstAccessMask
uint32_t dstQueueFamilyIndex
VkAccessFlags srcAccessMask
VkImageSubresourceRange subresourceRange
uint32_t srcQueueFamilyIndex
VkImageAspectFlags aspectMask
VkImageAspectFlags aspectMask
VkMemoryPropertyFlags propertyFlags
VkMemoryType memoryTypes[VK_MAX_MEMORY_TYPES]
const VkSemaphore * pWaitSemaphores
uint32_t waitSemaphoreCount
const uint32_t * pImageIndices
const VkSwapchainKHR * pSwapchains
VkSemaphoreCreateFlags flags
uint32_t waitSemaphoreCount
const VkPipelineStageFlags * pWaitDstStageMask
uint32_t commandBufferCount
const VkSemaphore * pWaitSemaphores
uint32_t signalSemaphoreCount
const VkCommandBuffer * pCommandBuffers
const VkSemaphore * pSignalSemaphores
VkSurfaceTransformFlagBitsKHR currentTransform
VkCompositeAlphaFlagsKHR supportedCompositeAlpha
VkExtent2D maxImageExtent
VkExtent2D minImageExtent
VkImageUsageFlags supportedUsageFlags
uint32_t imageArrayLayers
VkPresentModeKHR presentMode
VkImageUsageFlags imageUsage
VkSharingMode imageSharingMode
VkSwapchainCreateFlagsKHR flags
VkColorSpaceKHR imageColorSpace
uint32_t queueFamilyIndexCount
VkSurfaceTransformFlagBitsKHR preTransform
const uint32_t * pQueueFamilyIndices
VkCompositeAlphaFlagBitsKHR compositeAlpha
struct wined3d_private_store private_store
struct wined3d_swapchain_state_parent state_parent
IDXGISwapChain4 IDXGISwapChain4_iface
LONG in_set_fullscreen_state
struct wined3d_swapchain * wined3d_swapchain
IWineDXGIFactory * factory
struct d3d12_swapchain_op::@323::@326 resize_buffers
unsigned int sync_interval
VkImage vk_images[DXGI_MAX_SWAP_CHAIN_BUFFERS]
enum d3d12_swapchain_op_type type
DXGI_SWAP_CHAIN_DESC1 desc
struct d3d12_swapchain_op::@323::@325 present
unsigned int frame_number
DXGI_SWAP_CHAIN_DESC1 backend_desc
ID3D12Fence * present_fence
CRITICAL_SECTION worker_cs
ID3D12Resource * buffers[DXGI_MAX_SWAP_CHAIN_BUFFERS]
unsigned int vk_swapchain_width
struct dxgi_vk_funcs vk_funcs
VkImage vk_swapchain_images[DXGI_MAX_SWAP_CHAIN_BUFFERS]
HANDLE frame_latency_event
DXGI_SWAP_CHAIN_FULLSCREEN_DESC fullscreen_desc
ID3D12Fence * frame_latency_fence
unsigned int vk_swapchain_height
unsigned int current_buffer_index
struct wined3d_swapchain_state * state
VkCommandBuffer vk_cmd_buffers[DXGI_MAX_SWAP_CHAIN_BUFFERS]
IWineDXGIFactory * factory
VkSemaphore vk_semaphores[DXGI_MAX_SWAP_CHAIN_BUFFERS]
struct wined3d_swapchain_state_parent state_parent
VkPresentModeKHR present_mode
CONDITION_VARIABLE worker_cv
struct wined3d_private_store private_store
DXGI_SWAP_CHAIN_DESC1 desc
VkPhysicalDevice vk_physical_device
IDXGISwapChain4 IDXGISwapChain4_iface
VkCommandPool vk_cmd_pool
unsigned int buffer_count
ID3D12CommandQueue * command_queue
LONG in_set_fullscreen_state
VkImage vk_images[DXGI_MAX_SWAP_CHAIN_BUFFERS]
VkSwapchainKHR vk_swapchain
struct wined3d_output * wined3d_output
PFN_vkDestroySurfaceKHR p_vkDestroySurfaceKHR
PFN_vkGetInstanceProcAddr p_vkGetInstanceProcAddr
PFN_vkGetPhysicalDeviceSurfaceSupportKHR p_vkGetPhysicalDeviceSurfaceSupportKHR
PFN_vkCreateWin32SurfaceKHR p_vkCreateWin32SurfaceKHR
PFN_vkResetCommandBuffer p_vkResetCommandBuffer
PFN_vkGetPhysicalDeviceSurfacePresentModesKHR p_vkGetPhysicalDeviceSurfacePresentModesKHR
PFN_vkDestroySwapchainKHR p_vkDestroySwapchainKHR
PFN_vkDestroyFence p_vkDestroyFence
PFN_vkFreeMemory p_vkFreeMemory
PFN_vkDestroySemaphore p_vkDestroySemaphore
PFN_vkCmdPipelineBarrier p_vkCmdPipelineBarrier
PFN_vkWaitForFences p_vkWaitForFences
PFN_vkGetImageMemoryRequirements p_vkGetImageMemoryRequirements
PFN_vkEndCommandBuffer p_vkEndCommandBuffer
PFN_vkQueueSubmit p_vkQueueSubmit
PFN_vkCreateSwapchainKHR p_vkCreateSwapchainKHR
PFN_vkResetFences p_vkResetFences
PFN_vkGetSwapchainImagesKHR p_vkGetSwapchainImagesKHR
PFN_vkCreateSemaphore p_vkCreateSemaphore
PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR p_vkGetPhysicalDeviceSurfaceCapabilitiesKHR
PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR p_vkGetPhysicalDeviceWin32PresentationSupportKHR
PFN_vkDestroyImage p_vkDestroyImage
PFN_vkGetPhysicalDeviceMemoryProperties p_vkGetPhysicalDeviceMemoryProperties
PFN_vkAcquireNextImageKHR p_vkAcquireNextImageKHR
PFN_vkAllocateCommandBuffers p_vkAllocateCommandBuffers
PFN_vkCreateFence p_vkCreateFence
PFN_vkQueueWaitIdle p_vkQueueWaitIdle
PFN_vkCreateCommandPool p_vkCreateCommandPool
PFN_vkCmdBlitImage p_vkCmdBlitImage
PFN_vkQueuePresentKHR p_vkQueuePresentKHR
PFN_vkCreateImage p_vkCreateImage
PFN_vkBindImageMemory p_vkBindImageMemory
PFN_vkAllocateMemory p_vkAllocateMemory
PFN_vkDestroyCommandPool p_vkDestroyCommandPool
PFN_vkBeginCommandBuffer p_vkBeginCommandBuffer
PFN_vkGetPhysicalDeviceSurfaceFormatsKHR p_vkGetPhysicalDeviceSurfaceFormatsKHR
D3D12_RESOURCE_STATES present_state
enum vkd3d_structure_type type
unsigned int multisample_quality
unsigned int backbuffer_height
enum wined3d_multisample_type multisample_type
struct wined3d_output * output
unsigned int backbuffer_width
unsigned int backbuffer_count
enum wined3d_format_id backbuffer_format
enum wined3d_swap_effect swap_effect
unsigned int refresh_rate
unsigned int backbuffer_bind_flags
struct wined3d_swapchain * swapchain
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
#define CONTAINING_RECORD(address, type, field)
VKD3D_API VkInstance vkd3d_instance_get_vk_instance(struct vkd3d_instance *instance)
VKD3D_API struct vkd3d_instance * vkd3d_instance_from_device(ID3D12Device *device)
VKD3D_API VkQueue vkd3d_acquire_vk_queue(ID3D12CommandQueue *queue)
VKD3D_API VkFormat vkd3d_get_vk_format(DXGI_FORMAT format)
VKD3D_API ULONG vkd3d_resource_incref(ID3D12Resource *resource)
@ VKD3D_STRUCTURE_TYPE_IMAGE_RESOURCE_CREATE_INFO
VKD3D_API ULONG vkd3d_resource_decref(ID3D12Resource *resource)
VKD3D_API void vkd3d_release_vk_queue(ID3D12CommandQueue *queue)
VKD3D_API uint32_t vkd3d_get_vk_queue_family_index(ID3D12CommandQueue *queue)
VKD3D_API HRESULT vkd3d_create_image_resource(ID3D12Device *device, const struct vkd3d_image_resource_create_info *create_info, ID3D12Resource **resource)
VKD3D_API VkDevice vkd3d_get_vk_device(ID3D12Device *device)
VKD3D_API VkPhysicalDevice vkd3d_get_vk_physical_device(ID3D12Device *device)
#define VKD3D_RESOURCE_PRESENT_STATE_TRANSITION
VKD3D_API IUnknown * vkd3d_get_device_parent(ID3D12Device *device)
#define VKD3D_RESOURCE_INITIAL_STATE_TRANSITION
void VKAPI_CALL vkGetPhysicalDeviceMemoryProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties *pMemoryProperties)
void(VKAPI_PTR * PFN_vkDestroyCommandPool)(VkDevice, VkCommandPool, const VkAllocationCallbacks *)
VkFlags VkMemoryPropertyFlags
VkFlags VkPipelineStageFlags
VkResult(VKAPI_PTR * PFN_vkCreateSwapchainKHR)(VkDevice, const VkSwapchainCreateInfoKHR *, const VkAllocationCallbacks *, VkSwapchainKHR *)
void(VKAPI_PTR * PFN_vkGetPhysicalDeviceMemoryProperties)(VkPhysicalDevice, VkPhysicalDeviceMemoryProperties *)
VkResult VKAPI_CALL vkBindImageMemory(VkDevice device, VkImage image, VkDeviceMemory memory, VkDeviceSize memoryOffset)
VkResult VKAPI_CALL vkCreateSwapchainKHR(VkDevice device, const VkSwapchainCreateInfoKHR *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSwapchainKHR *pSwapchain)
@ VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL
@ VK_IMAGE_LAYOUT_PRESENT_SRC_KHR
@ VK_IMAGE_LAYOUT_UNDEFINED
@ VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL
@ VK_COMMAND_BUFFER_LEVEL_PRIMARY
void VKAPI_CALL vkDestroySemaphore(VkDevice device, VkSemaphore semaphore, const VkAllocationCallbacks *pAllocator)
#define VK_REMAINING_MIP_LEVELS
@ VK_SHARING_MODE_EXCLUSIVE
@ VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT
VkResult VKAPI_CALL vkQueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo *pSubmits, VkFence fence)
VkResult(VKAPI_PTR * PFN_vkGetPhysicalDeviceSurfaceSupportKHR)(VkPhysicalDevice, uint32_t, VkSurfaceKHR, VkBool32 *)
VkResult VKAPI_CALL vkQueueWaitIdle(VkQueue queue)
VkResult VKAPI_CALL vkGetPhysicalDeviceSurfacePresentModesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t *pPresentModeCount, VkPresentModeKHR *pPresentModes)
VkFlags VkImageUsageFlags
PFN_vkVoidFunction VKAPI_CALL vkGetDeviceProcAddr(VkDevice device, const char *pName)
VkResult(VKAPI_PTR * PFN_vkResetFences)(VkDevice, uint32_t, const VkFence *)
VkResult VKAPI_CALL vkAcquireNextImageKHR(VkDevice device, VkSwapchainKHR swapchain, uint64_t timeout, VkSemaphore semaphore, VkFence fence, uint32_t *pImageIndex)
VkResult(VKAPI_PTR * PFN_vkGetPhysicalDeviceSurfacePresentModesKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkPresentModeKHR *)
void VKAPI_CALL vkCmdBlitImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageBlit *pRegions, VkFilter filter)
void VKAPI_CALL vkDestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapchain, const VkAllocationCallbacks *pAllocator)
VkResult VKAPI_CALL vkBeginCommandBuffer(VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo *pBeginInfo)
@ VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT
VkResult(VKAPI_PTR * PFN_vkQueueSubmit)(VkQueue, uint32_t, const VkSubmitInfo *, VkFence)
VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR *pSurfaceCapabilities)
@ VK_IMAGE_TILING_OPTIMAL
PFN_vkVoidFunction(VKAPI_PTR * PFN_vkGetInstanceProcAddr)(VkInstance, const char *)
VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, VkSurfaceKHR surface, VkBool32 *pSupported)
void VKAPI_CALL vkFreeMemory(VkDevice device, VkDeviceMemory memory, const VkAllocationCallbacks *pAllocator)
PFN_vkVoidFunction(VKAPI_PTR * PFN_vkGetDeviceProcAddr)(VkDevice, const char *)
void VKAPI_CALL vkDestroyCommandPool(VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks *pAllocator)
void VKAPI_CALL vkDestroyFence(VkDevice device, VkFence fence, const VkAllocationCallbacks *pAllocator)
VkBool32(VKAPI_PTR * PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)(VkPhysicalDevice, uint32_t)
void VKAPI_CALL vkGetImageMemoryRequirements(VkDevice device, VkImage image, VkMemoryRequirements *pMemoryRequirements)
VkResult VKAPI_CALL vkAllocateCommandBuffers(VkDevice device, const VkCommandBufferAllocateInfo *pAllocateInfo, VkCommandBuffer *pCommandBuffers)
void(VKAPI_PTR * PFN_vkCmdBlitImage)(VkCommandBuffer, VkImage, VkImageLayout, VkImage, VkImageLayout, uint32_t, const VkImageBlit *, VkFilter)
VkResult VKAPI_CALL vkEndCommandBuffer(VkCommandBuffer commandBuffer)
void(VKAPI_PTR * PFN_vkDestroyFence)(VkDevice, VkFence, const VkAllocationCallbacks *)
@ VK_IMAGE_ASPECT_COLOR_BIT
void(VKAPI_PTR * PFN_vkDestroySemaphore)(VkDevice, VkSemaphore, const VkAllocationCallbacks *)
@ VK_IMAGE_USAGE_TRANSFER_DST_BIT
@ VK_IMAGE_USAGE_SAMPLED_BIT
@ VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT
@ VK_IMAGE_USAGE_TRANSFER_SRC_BIT
VkResult(VKAPI_PTR * PFN_vkGetPhysicalDeviceSurfaceFormatsKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkSurfaceFormatKHR *)
VkResult VKAPI_CALL vkWaitForFences(VkDevice device, uint32_t fenceCount, const VkFence *pFences, VkBool32 waitAll, uint64_t timeout)
VkResult(VKAPI_PTR * PFN_vkEndCommandBuffer)(VkCommandBuffer)
@ VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR
void(VKAPI_PTR * PFN_vkGetImageMemoryRequirements)(VkDevice, VkImage, VkMemoryRequirements *)
PFN_vkVoidFunction VKAPI_CALL vkGetInstanceProcAddr(VkInstance instance, const char *pName)
VkResult VKAPI_CALL vkAllocateMemory(VkDevice device, const VkMemoryAllocateInfo *pAllocateInfo, const VkAllocationCallbacks *pAllocator, VkDeviceMemory *pMemory)
VkResult VKAPI_CALL vkResetCommandBuffer(VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags)
VkResult(VKAPI_PTR * PFN_vkQueueWaitIdle)(VkQueue)
void(VKAPI_PTR * PFN_vkDestroySwapchainKHR)(VkDevice, VkSwapchainKHR, const VkAllocationCallbacks *)
void(VKAPI_PTR * PFN_vkFreeMemory)(VkDevice, VkDeviceMemory, const VkAllocationCallbacks *)
VkResult(VKAPI_PTR * PFN_vkCreateCommandPool)(VkDevice, const VkCommandPoolCreateInfo *, const VkAllocationCallbacks *, VkCommandPool *)
VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t *pSurfaceFormatCount, VkSurfaceFormatKHR *pSurfaceFormats)
VkResult VKAPI_CALL vkCreateSemaphore(VkDevice device, const VkSemaphoreCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSemaphore *pSemaphore)
void(VKAPI_PTR * PFN_vkDestroySurfaceKHR)(VkInstance, VkSurfaceKHR, const VkAllocationCallbacks *)
void(VKAPI_PTR * PFN_vkDestroyImage)(VkDevice, VkImage, const VkAllocationCallbacks *)
VkResult VKAPI_CALL vkCreateWin32SurfaceKHR(VkInstance instance, const VkWin32SurfaceCreateInfoKHR *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface)
VkResult(VKAPI_PTR * PFN_vkQueuePresentKHR)(VkQueue, const VkPresentInfoKHR *)
VkResult(VKAPI_PTR * PFN_vkCreateImage)(VkDevice, const VkImageCreateInfo *, const VkAllocationCallbacks *, VkImage *)
VkResult(VKAPI_PTR * PFN_vkAllocateCommandBuffers)(VkDevice, const VkCommandBufferAllocateInfo *, VkCommandBuffer *)
VkResult(VKAPI_PTR * PFN_vkBeginCommandBuffer)(VkCommandBuffer, const VkCommandBufferBeginInfo *)
VkResult(VKAPI_PTR * PFN_vkWaitForFences)(VkDevice, uint32_t, const VkFence *, VkBool32, uint64_t)
VkResult(VKAPI_PTR * PFN_vkCreateFence)(VkDevice, const VkFenceCreateInfo *, const VkAllocationCallbacks *, VkFence *)
VkResult(VKAPI_PTR * PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR)(VkPhysicalDevice, VkSurfaceKHR, VkSurfaceCapabilitiesKHR *)
VkResult VKAPI_CALL vkQueuePresentKHR(VkQueue queue, const VkPresentInfoKHR *pPresentInfo)
@ VK_ERROR_OUT_OF_HOST_MEMORY
@ VK_ERROR_OUT_OF_DEVICE_MEMORY
@ VK_ERROR_OUT_OF_DATE_KHR
@ VK_ACCESS_TRANSFER_WRITE_BIT
VkResult(VKAPI_PTR * PFN_vkGetSwapchainImagesKHR)(VkDevice, VkSwapchainKHR, uint32_t *, VkImage *)
VkResult VKAPI_CALL vkResetFences(VkDevice device, uint32_t fenceCount, const VkFence *pFences)
VkResult(VKAPI_PTR * PFN_vkBindImageMemory)(VkDevice, VkImage, VkDeviceMemory, VkDeviceSize)
@ VK_PRESENT_MODE_IMMEDIATE_KHR
@ VK_PRESENT_MODE_FIFO_KHR
VkResult(VKAPI_PTR * PFN_vkResetCommandBuffer)(VkCommandBuffer, VkCommandBufferResetFlags)
VkResult VKAPI_CALL vkGetSwapchainImagesKHR(VkDevice device, VkSwapchainKHR swapchain, uint32_t *pSwapchainImageCount, VkImage *pSwapchainImages)
VkResult VKAPI_CALL vkCreateFence(VkDevice device, const VkFenceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkFence *pFence)
@ VK_FORMAT_B8G8R8A8_UNORM
@ VK_FORMAT_A2B10G10R10_UNORM_PACK32
@ VK_FORMAT_R8G8B8A8_UNORM
@ VK_FORMAT_R16G16B16A16_SFLOAT
void(VKAPI_PTR * PFN_vkCmdPipelineBarrier)(VkCommandBuffer, VkPipelineStageFlags, VkPipelineStageFlags, VkDependencyFlags, uint32_t, const VkMemoryBarrier *, uint32_t, const VkBufferMemoryBarrier *, uint32_t, const VkImageMemoryBarrier *)
@ VK_COLOR_SPACE_SRGB_NONLINEAR_KHR
VkResult(VKAPI_PTR * PFN_vkAcquireNextImageKHR)(VkDevice, VkSwapchainKHR, uint64_t, VkSemaphore, VkFence, uint32_t *)
#define VK_REMAINING_ARRAY_LAYERS
@ VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT
@ VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT
@ VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT
@ VK_PIPELINE_STAGE_TRANSFER_BIT
void VKAPI_CALL vkCmdPipelineBarrier(VkCommandBuffer commandBuffer, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, VkDependencyFlags dependencyFlags, uint32_t memoryBarrierCount, const VkMemoryBarrier *pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier *pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier *pImageMemoryBarriers)
void VKAPI_CALL vkDestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks *pAllocator)
VkResult(VKAPI_PTR * PFN_vkCreateWin32SurfaceKHR)(VkInstance, const VkWin32SurfaceCreateInfoKHR *, const VkAllocationCallbacks *, VkSurfaceKHR *)
VkResult VKAPI_CALL vkCreateCommandPool(VkDevice device, const VkCommandPoolCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkCommandPool *pCommandPool)
VkResult(VKAPI_PTR * PFN_vkAllocateMemory)(VkDevice, const VkMemoryAllocateInfo *, const VkAllocationCallbacks *, VkDeviceMemory *)
VkResult VKAPI_CALL vkCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkImage *pImage)
#define VK_QUEUE_FAMILY_IGNORED
void VKAPI_CALL vkDestroyImage(VkDevice device, VkImage image, const VkAllocationCallbacks *pAllocator)
VkResult(VKAPI_PTR * PFN_vkCreateSemaphore)(VkDevice, const VkSemaphoreCreateInfo *, const VkAllocationCallbacks *, VkSemaphore *)
VkBool32 VKAPI_CALL vkGetPhysicalDeviceWin32PresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex)
@ VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR
@ VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO
@ VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO
@ VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO
@ VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO
@ VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR
@ VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO
@ VK_STRUCTURE_TYPE_FENCE_CREATE_INFO
@ VK_STRUCTURE_TYPE_SUBMIT_INFO
@ VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO
@ VK_STRUCTURE_TYPE_PRESENT_INFO_KHR
@ VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER
DWORD WINAPI GetLastError(void)
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)
HRESULT CDECL wined3d_swapchain_state_resize_target(struct wined3d_swapchain_state *state, const struct wined3d_display_mode *mode)
struct wined3d_texture *CDECL wined3d_swapchain_get_back_buffer(const struct wined3d_swapchain *swapchain, UINT back_buffer_idx)
void CDECL wined3d_swapchain_get_desc(const struct wined3d_swapchain *swapchain, struct wined3d_swapchain_desc *desc)
void CDECL wined3d_swapchain_state_destroy(struct wined3d_swapchain_state *state)
BOOL CDECL wined3d_swapchain_state_is_windowed(const struct wined3d_swapchain_state *state)
HRESULT CDECL wined3d_swapchain_resize_buffers(struct wined3d_swapchain *swapchain, unsigned int buffer_count, unsigned int width, unsigned int height, enum wined3d_format_id format_id, enum wined3d_multisample_type multisample_type, unsigned int multisample_quality)
ULONG CDECL wined3d_swapchain_decref(struct wined3d_swapchain *swapchain)
HRESULT CDECL wined3d_swapchain_create(struct wined3d_device *device, const struct wined3d_swapchain_desc *desc, struct wined3d_swapchain_state_parent *state_parent, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_swapchain **swapchain)
HRESULT CDECL wined3d_swapchain_state_set_fullscreen(struct wined3d_swapchain_state *state, const struct wined3d_swapchain_desc *swapchain_desc, const struct wined3d_display_mode *mode)
ULONG CDECL wined3d_swapchain_incref(struct wined3d_swapchain *swapchain)
HRESULT CDECL wined3d_swapchain_state_create(const struct wined3d_swapchain_desc *desc, HWND window, struct wined3d *wined3d, struct wined3d_swapchain_state_parent *state_parent, struct wined3d_swapchain_state **state)
HRESULT CDECL wined3d_swapchain_present(struct wined3d_swapchain *swapchain, const RECT *src_rect, const RECT *dst_rect, HWND dst_window_override, unsigned int swap_interval, uint32_t flags)
void CDECL wined3d_swapchain_state_get_size(const struct wined3d_swapchain_state *state, unsigned int *width, unsigned int *height)
struct wined3d_swapchain_state *CDECL wined3d_swapchain_get_state(struct wined3d_swapchain *swapchain)
static void wined3d_private_store_cleanup(struct wined3d_private_store *store)
@ WINED3D_SWAP_EFFECT_FLIP_DISCARD
@ WINED3D_SWAP_EFFECT_SEQUENTIAL
@ WINED3D_SWAP_EFFECT_DISCARD
@ WINED3D_SWAP_EFFECT_FLIP_SEQUENTIAL
#define WINED3D_SWAPCHAIN_GDI_COMPATIBLE
static void wined3d_private_store_init(struct wined3d_private_store *store)
#define WINED3DERR_INVALIDCALL
#define WINED3D_TEXTURE_CREATE_GET_DC
void WINAPI wined3d_mutex_unlock(void)
void WINAPI wined3d_mutex_lock(void)
#define DXGI_ERROR_NOT_FOUND
static HRESULT HRESULT_FROM_WIN32(unsigned int x)
#define DXGI_STATUS_MODE_CHANGE_IN_PROGRESS
#define DXGI_ERROR_UNSUPPORTED
#define DXGI_STATUS_OCCLUDED
#define DXGI_ERROR_INVALID_CALL
#define DXGI_ERROR_NOT_CURRENTLY_AVAILABLE
#define DUPLICATE_SAME_ACCESS
size_t const buffer_count