On Wed Oct 26 14:56:45 2022 +0000, Francisco Casas wrote:
Cool! But, at least for me, this test is currently throwing a failed assertion in another place:
shader_runner: /home/fcasas/Music/vkd3d/libs/vkd3d-shader/hlsl_sm4.c:882: sm4_register_from_deref: Assertion `data_type->type <= HLSL_CLASS_VECTOR' failed.
I suggest adding a similar check to this one that is in `write_sm4_resource_load()`:
if (resource_type->type != HLSL_CLASS_OBJECT) { assert(resource_type->type == HLSL_CLASS_ARRAY || resource_type->type == HLSL_CLASS_STRUCT); hlsl_fixme(ctx, &load->node.loc, "Resource being a component of another variable."); return; }
in `write_sm4_resource_store()`. I will modify `sm4_register_from_deref()` to handle UAVs as components of other variables properly in v2 of "broaden resources support".
For the record, I wrote this test to illustrate how it can trigger a failed assertion, but we don't have the capability of passing it yet, so it should be marked as "todo".