[PATCH vkd3d 1/4] vkd3d-shader/spirv: Use runtime descriptor arrays.

Henri Verbeet hverbeet at gmail.com
Tue Nov 16 04:38:22 CST 2021


On Wed, 10 Nov 2021 at 08:03, Conor McCarthy <cmccarthy at codeweavers.com> wrote:
> +struct vkd3d_symbol;
> +
Is that forward declaration needed? It seems superfluous.

> +struct vkd3d_descriptor_array_symbol
> +{
> +    const struct vkd3d_symbol *symbol;
> +    unsigned int binding_base_idx;
> +};
> +
I think the "_symbol" in "vkd3d_descriptor_array_symbol" may be a
little misleading; this is structure is not a symbol in the way that
struct vkd3d_symbol is, or struct vkd3d_symbol_descriptor_array for
that matter.

> -    /* The array declaration which this symbol maps to, or NULL. */
> -    const struct vkd3d_symbol *descriptor_array;
> +    /* descriptor_array.symbol is the array declaration which this symbol maps to, or NULL. */
> +    struct vkd3d_descriptor_array_symbol descriptor_array;
>
And the comment here just emphasises that.

I'm wondering, could we just store the contents of struct
vkd3d_descriptor_array_symbol in the vkd3d_symbol_register_data and
vkd3d_symbol_resource_data structures?



More information about the wine-devel mailing list