[PATCH vkd3d v3 3/6] vkd3d-shader/hlsl: Allow failure in hlsl_offset_from_deref.
Zebediah Figura (she/her)
zfigura at codeweavers.com
Thu Nov 11 22:16:36 CST 2021
On 11/11/21 05:06, Giovanni Mascellani wrote:
> +unsigned int hlsl_offset_from_deref_safe(struct hlsl_ctx *ctx, const struct hlsl_deref *deref)
> +{
> + unsigned int offset;
> +
> + if (hlsl_offset_from_deref(deref, &offset))
> + return offset;
> +
> + hlsl_fixme(ctx, deref->offset.node->loc, "Dereference with non-constant offset of type %s.",
> + hlsl_node_type_to_string(deref->offset.node->type));
> +
> + return 0;
> }
I don't hate this, but ultimately we're going to need to handle
non-constant offsets in the callers anyway. I'd just pass the buck all
the way down to sm4_register_from_deref() and write_sm1_{load,store}().
More information about the wine-devel
mailing list