On 11/4/19 5:27 PM, Philip Rebohle wrote:
Am 04.11.19 um 17:23 schrieb Hans-Kristian Arntzen:
On 11/4/19 4:46 PM, Philip Rebohle wrote:
Hello,
I'm currently looking into getting Deus Ex: Mankind Divided to run on vkd3d. Among other issues, it uses ClearUnorderedAccessView for typed buffer views, which is currently not supported and will require the use of a compute shader.
There are also a few other areas where shader-based implementations might become necessary in the future, e.g. for copies between depth and color images, ResolveSubresource with typeless images, etc.
What would be the preferred way to integrate shaders for this purpose in vkd3d?
One option would be to compile GLSL shaders at build-time to a C header containing the SPIR-V code, which could then be included in the vkd3d source files directly.
This would introduce glslangValidator as a new build-time dependency, is that acceptable? Also, how would this be implemented in the build system? I don't have much experience with autoconf, so some help in that regard would be highly appreciated.
I can suggest using shaderc, as glslc has a built-in option to emit a C array, using -mfmt=c, which can be #included into a C file. Doing the same in glslangValidator might be more work overall.
glslangValidator also provides --variable-name to generate a C array, which I'm using in DXVK without too much of a hassle. Does shaderc do anything differently?
If glslang also has support for this now, then there isn't much of a point in using shaderc.
Cheers, Hans-Kristian
- Philip
Cheers, Hans-Kristian
I'd like to avoid including pre-compiled SPIR-V binaries in the source tree directly or installing them as separate files if possible, since doing so would complicate the workflow significantly.
Regards,
- Philip