On Wed Oct 26 14:48:24 2022 +0000, Henri Verbeet wrote:
Turns out it is quite simple, so I've added it in v2, and also your
test. Thanks! Unfortunately that test fails here:
shader_runner:541:Section [test], line 51: Todo: Failed to compile shaders. shader_runner:541:Section [test], line 101: Todo: Failed to compile shaders. shader_runner:541:Section [test], line 120: Todo: Failed to compile shaders. shader_runner:541:Section [test], line 146: Test failed: Failed to compile shaders.
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()`:
```c 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".