Skip to content

r600/sfn: Don't pass sampler IDs to instructions not using them

I haven't tested this deeply so far, but according to the documentation:

  • …the gradients are provided by software in the last-executed SET_GRADIENTS_H and SET_GRADIENTS_V instructions.
  • …using texel offsets from a previous SET_TEXTURE_OFFSETS instruction.

It is, I think, not very likely that the gradients and the offsets are set per-sampler, as that'd require a lot of per-wavefront register memory in the hardware at least, and in the design of the hardware the resources and the samplers are merely "constants".

The Direct3D 10+ HLSL function implemented by GET_TEXTURE_RESINFO, GetDimensions, doesn't take a sampler as an argument, and its result is logically not affected by the sampler in any way (probably including MIN_LOD, as it's only applied to the LOD computed during filtering). Its functionality in the hardware also largely duplicates GET_NUMBER_OF_SAMPLES, which already doesn't use the sampler ID in SFN.

Merge request reports