On Fri Jun 2 22:38:25 2023 +0000, Nikolay Sivov wrote:
I couldn't try this since it does not apply any more, but one thing that I noticed is that 1D case should actually produce 2D resource declaration, and use (x, 0.5) as a coordinate.
I see, albeit I am inclined to implement this as a new pass as in https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/219#note_34533
In this scheme, SM1 should keep the 1D resource loads, and just pass any value to `src0.y` when writing `texld` or `texldp`. One thing would remain, which is to allow SM1 samplers to be used both in tex1D() and tex2D() without calling them inconsistent.... Native SM4 just explodes:
```hlsl sampler sam; float4 main() : sv_target { return tex1D(sam, 0.0) + tex2D(sam, float2(0, 1)); } ``` ``` internal error: compilation aborted unexpectedly
compilation failed; no code produced ```