vkd3d: Thoughts on how to include shaders in the project?
Philip Rebohle
philip.rebohle at tu-dortmund.de
Mon Nov 4 10:27:13 CST 2019
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?
- 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
>>
>
More information about the wine-devel
mailing list