vkd3d: Thoughts on how to include shaders in the project?
Hans-Kristian Arntzen
post at arntzen-software.no
Mon Nov 4 10:23:05 CST 2019
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.
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
>
More information about the wine-devel
mailing list