[PATCH vkd3d 00/13] vkd3d: Implement compute-shader based UAV clears.

Philip Rebohle philip.rebohle at tu-dortmund.de
Mon Nov 11 10:03:35 CST 2019


This series addresses the following issues with the current ClearUnorderedAccessView* implementation:
- Supports arbitrary buffer formats, not just R32_{UINT,TYPELESS}.
- Handles images with non-UINT formats in ClearUnorderedAccessViewUint.
- Avoids transfer stage barriers by always using a compute shader.
- Implements ClearUnorderedAccessViewFloat, which was previously not supported.
- Supports clear rects.

It should be possible to reuse a lot of the preliminary work for future meta operations
(such as depth<->color clears mentioned on https://wiki.winehq.org/Vkd3d_known_issues).

As for shaders, I did try to hook up glslangValidator to the build system so that they
could be compiled at build time, but without success, so I put the binaries into their
own header file.

Unfortunately, the number of permutations is fairly high (12 in this case), and it seems
impossible to generate a single SPIR-V binary with multiple entry points (GLSL requires
the entry point to be 'main' so there can only be one, and none of the easily accessible
HLSL compilers seem to support it either).

An alternative would be to generate the SPIR-V shaders on the fly, but the SPIR-V
builder from vkd3d-shader is private so this would require a lot of additional work.

Note that this may conflict with the following pending patches (haven't checked in detail):
- 171883 "vkd3d: Allocate one large buffer for a heap and offset into it."
- 172639 "vkd3d: Store a copy of Vulkan view object handles in descriptors."





More information about the wine-devel mailing list