Commit 02fe9f5bdf introduced linking the
Windows build of the demos with d3d12 and dxgi, while also still linking
to libvkd3d-utils.la. That happens to more or less work on Wine; we get
vkd3d-utils' D3D12CreateDevice(), and Wine's
IDXGIFactory2_CreateSwapChainForHwnd(), but because Wine's
implementation of d3d12 swapchains uses vkd3d, we're able to use the
resulting swapchain buffers even though the instance of vkd3d used by
Wine may not be the same instance of vkd3d used by the demos. Perhaps
unsurprisingly, things don't go nearly as well on Windows.
We could of course stop linking the demos to vkd3d-utils on Windows, but
that's not that interesting; we're trying to show what vkd3d can do
here, not what d3d12 can do.
For backwards compatibility. Newer vkd3d versions may report more
capabilities, but some of those may also require newer vkd3d APIs in order to
use them. That's an issue for a vkd3d user like Wine, where reporting more
capabilities may cause the application to try to use APIs that are not
implemented in that version of Wine.
Note that using ELF symbol versioning would have solved the issue for existing
binaries compiled against older versions of vkd3d, but not for older source
compiled against newer versions of vkd3d.
Users of vkd3d-utils should define VKD3D_UTILS_API_VERSION to the vkd3d
API version they wish to target.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Fixes the following validation error:
IMAGE(ERROR): object: 0x0 type: 0 location: 3302 msgCode: 180357110:
vkCreateImageView() format VK_FORMAT_B8G8R8A8_UNORM differs from image 6
format VK_FORMAT_B8G8R8A8_SRGB. Formats MUST be IDENTICAL unless
VK_IMAGE_CREATE_MUTABLE_FORMAT BIT was set on image creation. The spec
valid usage text states 'If image was not created with the
VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag, format must be identical to the
format used to create image'
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>