On Wed May 31 05:49:53 2023 +0000, Francisco Casas wrote:
I'm rather tempted to propose that we just leave off handling anything
but top-level sm1 variables for an hlsl_fixme(). For that matter, do we even have anything that actually needs this combined-sampler logic? No, not that I remember. Okay, I simplified it so that it only supports samplers and sample arrays (it emits a fixme for samplers within structs), now it is closer to the original patch. There is a test that will remain as TODO.
Perhaps more saliently, after doing a bit of testing, it seems that
native logic here gets stupidly complicated, and this code isn't quite correct as-is. I don't think it's really worth trying to fix the code just for that. I agree that the native logic gets complicated (and the native compiler even emits its own fixmes in many cases), also, it is hard to know what it does support and what it doesn't. But I am curious about what is not correct of the code.
I don't remember exactly; unfortunately I didn't write down, but I was able to recreate this example
``` struct apple { struct { sampler s[2]; float4 pos; } s[2]; } a;
float4 main(float4 f : texcoord) : sv_target { return tex2D(a.s[1].s[1], a.s[1].pos); } ```
which I believe yielded different RDEF information between native and (the old version of) this patch set.
I feel like there might have been an example that also yielded different allocation, but I might be misremembering.