Hi,
I drafted what I think is a final implementation. This one should pass on all the HW you have.
After that, I will clean the patches for submission.
Wine results are set to emulate the results with
* +0.5 offset (unconditionally)
* AMD swizzle,
* 3d textures off,
* Fetch4 on for all texldXX instructions. (texldp projected).
- Some AMD HW decides not to enable fetch4 on texldl, texldb, texldd.
But I think it makes more sense to have it on, since some AMD devices have it on, and intel as well.
- 3D textures are a mess, some enable fetch4, some not, some round the z axis to nearest texels, and some set it to 0.
Best and simplest thing to do in my opinion is consider it totally broken, and leave it disabled, like some AMD HW does.
Also because is quite hard to implement it in GL.
In the end I increased the test range to 2, to overcome rounding issues.
PD: Thanks Axel for the comment on the R500 bug. That is really helpful and explains why we are seeing the results we have.
In the end, looks like it is true that Intel is following the spec, and is AMD the one that introduced the bug.
It is funny though that AMD never amended the spec to clarify what they considered to be the default fetch4 behavior in their devices.
BR,
Daniel