On Mon Jun 5 20:32:54 2023 +0000, Zebediah Figura wrote:
I don't see how it ever makes sense to emit a 1D load in the IR from intrinsic_tex1D(). The load is fundamentally 2D, regardless of profile version. Lowering is a thing to deal with differences between profile bytecode, or high-level constructions that can't easily be emitted already lowered; I don't see how either applies here?
It's not to make sense as a load, but to be able to tell them apart later. If it was tex2D() initially there is nothing else to do, if it was tex1D(), SM4 needs to do something (checking for combined sampling case to distinguish it from regular SM4 1D load).
What was proposed is to produce something "common" for functions, and then have multiple passes to fix that up, instead of producing final result immediately.