On Thu Oct 20 14:57:08 2022 +0000, Giovanni Mascellani wrote:
It seems that the native compiler generates instructions like this:
ld_uav_typed_indexable(texture2d)(float,float,float,float) r0.xyzw, l(0, 0, 0, 0), u2.xyzw
The instruction you generate miss the `_indexable(texture2d)` bit. AFAIU that would require adding a modifier of type `VKD3D_SM5_MODIFIER_RESOURCE_TYPE`. Is it intentional? I guess that if the compiled shader is fed to vkd3d/wine we don't care too much about that field, but should we write it any way in the interest of compatibility with native?
We should write it, yes, but it's a bit out of scope of this patch. Those `VKD3D_SM5_MODIFIER_RESOURCE_TYPE` modifiers are generated on all sm 5.0 resource loads, not just UAV loads.