[PATCH vkd3d 1/3] vkd3d-shader: Introduce a shader interface extension for binding offset info.

Henri Verbeet hverbeet at gmail.com
Mon Oct 11 17:49:16 CDT 2021


On Mon, 11 Oct 2021 at 16:23, Conor McCarthy <cmccarthy at codeweavers.com> wrote:
> +/* Extends vkd3d_shader_interface_info. */
> +struct vkd3d_shader_binding_offset_info
> +{
> +    /** Must be set to VKD3D_SHADER_STRUCTURE_TYPE_BINDING_OFFSET_INFO. */
> +    enum vkd3d_shader_structure_type type;
> +    /** Optional pointer to a structure containing further parameters. */
> +    const void *next;
> +
> +    /**
> +     * Pointer to an array of offsets into shader resource descriptor bindings.
> +     * These correlate 1:1 to the 'bindings' array in struct
> +     * vkd3d_shader_interface_info, and will be added to the register index to
> +     * address the correct location in a merged binding.
> +     */
> +    const unsigned int *binding_offsets;
> +};
> +
What about UAV counter bindings and/or combined sampler bindings?
Should we support offsets for those?
Is the "binding_offsets" field allowed to be NULL?
Specifying this in terms of the register index works, but is perhaps
not the most intuitive way to specify this. The other way to look at
it is as the start offset in the descriptor array specified by the
vkd3d_shader_descriptor_binding structure. That would make this more
of a "descriptor offset" than a "binding offset", but that's somewhat
true already; this doesn't index the "bindings" array.
How does this interact with the "count" field in the
vkd3d_shader_descriptor_binding structure? Does "count" start counting
at the offset or at zero?



More information about the wine-devel mailing list