Direct3D to Vulkan translation library
Go to file
Martin Storsjö 1c61b20616 vkd3d-shader/spirv: Fix the signature of vkd3d_spirv_build_op_type_image.
Don't assume that enums and uint32_t parameters are identical. Clang
16 changes the diagonstic for incompatible function pointer types
from a warning into an error by default.

This fixes the following error, when built (for aarch64, but probably
also for other architectures) in MSVC mode:

../src/libs/vkd3d/libs/vkd3d-shader/spirv.c:1083:13: error: incompatible function pointer types passing 'uint32_t (struct vkd3d_spirv_builder *, uint32_t, SpvDim, uint32_t, uint32_t, uint32_t, uint32_t, SpvImageFormat)' (aka 'unsigned int (struct vkd3d_spirv_builder *, unsigned int, enum SpvDim_, unsigned int, unsigned int, unsigned int, unsigned int, enum SpvImageFormat_)') to parameter of type 'vkd3d_spirv_build7_pfn' (aka 'unsigned int (*)(struct vkd3d_spirv_builder *, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int)') [-Wincompatible-function-pointer-types]
            vkd3d_spirv_build_op_type_image);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/libs/vkd3d/libs/vkd3d-shader/spirv.c:612:68: note: passing argument to parameter 'build_pfn' here
        SpvOp op, const uint32_t *operands, vkd3d_spirv_build7_pfn build_pfn)
                                                                   ^

Signed-off-by: Martin Storsjö <martin@martin.st>
2022-08-15 21:59:38 +02:00
bin build: Add initial Autotools files. 2016-09-21 09:05:15 +02:00
crosslibs Add crosslibs .a to .gitignore. 2016-10-24 13:57:04 +02:00
demos Release 1.4. 2022-06-22 18:31:51 +02:00
include include: Add list_move_after() and list_move_before(). 2022-08-10 21:33:33 +02:00
libs vkd3d-shader/spirv: Fix the signature of vkd3d_spirv_build_op_type_image. 2022-08-15 21:59:38 +02:00
m4 configure: Allow specifying the Vulkan library path with VULKAN_LIBS. 2022-04-27 21:46:18 +02:00
programs/vkd3d-compiler Release 1.4. 2022-06-22 18:31:51 +02:00
tests vkd3d: Send typed UAV unknown format read support info to vkd3d-shader. 2022-08-09 22:14:28 +02:00
.gitignore vkd3d-shader: Implement an initial pass-through HLSL preprocessor. 2020-12-09 19:59:49 +01:00
ANNOUNCE Release 1.4. 2022-06-22 18:31:51 +02:00
AUTHORS Release 1.4. 2022-06-22 18:31:51 +02:00
autogen.sh build: Add initial Autotools files. 2016-09-21 09:05:15 +02:00
configure.ac Release 1.4. 2022-06-22 18:31:51 +02:00
COPYING Release 1.3. 2022-03-02 21:32:57 +01:00
Doxyfile.in include: Add basic documentation for vkd3d_types.h. 2020-09-02 16:22:47 +02:00
INSTALL build: Add some standard files. 2016-10-28 12:34:12 +02:00
LICENSE Update license to LGPL v2.1. 2017-06-16 22:11:21 +02:00
Makefile.am tests: Test arithmetic int operations without constant operands. 2022-07-05 22:43:30 +02:00
README vkd3d: Use Vulkan null descriptors if EXT_robustness2 is available. 2022-03-24 19:46:13 +01:00

=============================
The vkd3d 3D Graphics Library
=============================

Vkd3d is a 3D graphics library built on top of Vulkan. It has an API very
similar, but not identical, to Direct3D 12.

==============
Building vkd3d
==============

Vkd3d depends on SPIRV-Headers and Vulkan-Headers (>= 1.2.139).

Vkd3d generates some of its headers from IDL files. If you are using the
release tarballs, then these headers are pre-generated and are included. If
you are building from git, then they will be generated at build-time using
widl. By default, vkd3d will use the widl found in `PATH'. If widl is not
available or is not recent (>= 3.20), then you can build Wine with `make
tools/widl' to avoid building all of Wine. You can then point vkd3d's
configure at that widl binary with `WIDL="/path/to/widl"'.

For release builds, you may want to define NDEBUG. If you do not need debug log
messages, you may also consider VKD3D_NO_TRACE_MESSAGES and
VKD3D_NO_DEBUG_MESSAGES. For example, you can pass `CPPFLAGS="-DNDEBUG
-DVKD3D_NO_TRACE_MESSAGES"' to configure.

===========
Using vkd3d
===========

Vkd3d can be used by projects that target Direct3D 12 as a drop-in replacement
at build-time with some modest source modifications.

If vkd3d is available when building Wine, then Wine will use it to support
Direct3D 12 applications.

=====================
Environment variables
=====================

Most of the environment variables used by vkd3d are for debugging purposes. The
environment variables are not considered a part of API and might be changed or
removed in the future versions of vkd3d.

Some of debug variables are lists of elements. Elements must be separated by
commas or semicolons.

 * NO_COLOR - this is an alias of NO_COLOUR.

 * NO_COLOUR - when set, vkd3d-compiler will default to monochrome output,
   even when the output supports colour.

 * VKD3D_CONFIG - a list of options that change the behavior of libvkd3d.
    * virtual_heaps - Create descriptors for each D3D12 root signature
      descriptor range instead of entire descriptor heaps. Useful when push
      constant or bound descriptor limits are exceeded.
    * vk_debug - enables Vulkan debug extensions.

 * VKD3D_DEBUG - controls the debug level for log messages produced by
   libvkd3d. Accepts the following values: none, err, fixme, warn, trace.

 * VKD3D_VULKAN_DEVICE - a zero-based device index. Use to force the selected
   Vulkan device.

 * VKD3D_DISABLE_EXTENSIONS - a list of Vulkan extensions that libvkd3d should
   not use even if available.

 * VKD3D_SHADER_DEBUG - controls the debug level for log messages produced by
   libvkd3d-shader. See VKD3D_DEBUG for accepted values.

 * VKD3D_SHADER_DUMP_PATH - path where shader bytecode is dumped.

 * VKD3D_TEST_DEBUG - enables additional debug messages in tests. Set to 0, 1
   or 2.

 * VKD3D_TEST_FILTER - a filter string. Only the tests whose names matches the
   filter string will be run, e.g. VKD3D_TEST_FILTER=clear_render_target.
   Useful for debugging or developing new tests.

 * VKD3D_TEST_PLATFORM - can be set to "wine", "windows" or "other". The test
   platform controls the behavior of todo(), todo_if(), bug_if() and broken()
   conditions in tests.

 * VKD3D_TEST_BUG - set to 0 to disable bug_if() conditions in tests.