[PATCH vkd3d 3/5] vkd3d-shader/spirv: Send descriptor offsets via a shader parameter.

Conor McCarthy cmccarthy at codeweavers.com
Wed Nov 24 21:32:47 CST 2021


November 25, 2021 4:36 AM, "Henri Verbeet" <hverbeet at gmail.com> wrote:

> In the case of descriptor offsets, what's missing is support for
> specifying arrays. That may simply be a matter of adding something
> like "const uint32_t *u32_array;" to the union in the
> vkd3d_shader_parameter_immediate_constant structure. The
> specialisation constant path should work fine as-is in terms of API,
> but probably needs some work in terms of SPIR-V generation.

Should this use a new helper for getting an immediate constant from an array, something like:

    vkd3d_dxbc_compiler_get_uint_shader_array_parameter(struct vkd3d_dxbc_compiler *compiler,
            enum vkd3d_shader_parameter_name name, unsigned int index)

Plus a data type check in vkd3d_dxbc_compiler_emit_uint_shader_parameter().

I don't see a need to support specialisation constant arrays. We can just emit a compiler error if the UINT32_ARRAY data type is specified for a specialisation constant.



More information about the wine-devel mailing list