<div dir="ltr"><div>Hi Stefan,</div><div><br></div><div>Instead of keeping the discussion private I prefer to send it to the same thread.</div><div><div></div><div><br></div><div>I got a new file for you to test. <a href="https://www.dropbox.com/s/9a3t1j2nsy3nlm0/d3d9_crosstest.exe?dl=0">https://www.dropbox.com/s/9a3t1j2nsy3nlm0/d3d9_crosstest.exe?dl=0</a>  <br></div><div>I made some big mistakes on the first one (like wine and windows flags were inverted).</div><div>This new one will hopefully only fail on the middle of the projection (due to rounding i will fix tomorrow), and DFXX.</div><div><br></div><div>The screenshot of texldp and DF16/24 are the only ones I need to finalize the implementation.</div><div>For reference, these are my screenshots of DF16/DF24 on wine.</div><div><div><img src="cid:ii_jr70ol5n0" alt="image.png" style="margin-right: 0px;" width="226" height="169"><br></div></div><div><br></div><div>BTW, according to your data, the R500 and HD5700 behave differently on the texldl/texldd/texldb.</div><div>The "HD 5700" has fetch4 off, while the R500 has fetch4 ON and behaves like "texld".</div><div>I am making wine behave like the R500 / Intel and keep those ON with Fetch4.</div><div>I
 have a suspicion that this may have been affected due to the change of 
D3DTEXF_LINEAR / D3DTEXF_POINT. But I don't think so....<br></div><div><br></div><div>BR,</div><div>Daniel</div></div></div><br><div class="gmail_quote"><div dir="ltr">El mar., 15 ene. 2019 a las 10:45, Stefan Dösinger (<<a href="mailto:stefandoesinger@gmail.com">stefandoesinger@gmail.com</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Am 14.01.19 um 23:22 schrieb DarkZeros:<br>
> *_Differences_:*<br>
> - *Fetch4 offset*. It looks to me that what my result match the spec,<br>
> while your results are different.<br>
> The spec states that fetch4 "/allows the fetching of four unfiltered<br>
> neighboring texels (2x2 texel block) in a single texture instruction./"<br>
> Also points to DirectX11 Gather as a similar instruction with different<br>
> swizzle. Gather: "/Gets the four samples (red component only) that would<br>
> be used for bilinear interpolation when sampling a texture/."<br>
> So if we assume that is true then the results need to have an offset,<br>
> like in the newest Intel implementation (see screenshot with OFF/ON, I<br>
> highlighted the texels locations in linear filtering ):<br>
Yes, I think you are right, the results you get on your Intel GPU make<br>
more sense than the ones I get on my slightly older Intel and the AMD GPU.<br>
<br>
At the edges of the output image you'd expect a wrap-around to the other<br>
side of the texture. That this does not happen on AMD suggests that they<br>
add a 0.5x0.5 texel offset when fetch4 is used. Why they would do that<br>
is beyond me though.<br>
<br>
I haven't found any Microsoft documents that explicitly state that the<br>
texture coordinates in d3d9 are at the center of the texel (like they<br>
are in GL and d3d10), unlike the viewport coordinates, that are in the<br>
corner of the framebuffer pixels. However, a number of third party<br>
documentation suggests this. That would also explain why we never had to<br>
worry about a half texel offset with textures.<br>
<br>
I guess AMD incorrectly tried to correct the d3d9 weirdness.<br>
<br>
Since AMD invented fetch4 we should stick to their behavior, if possible.<br>
<br>
> - *Swizzle*. Checking the spec, it looks like yours is what the spec<br>
> says and mine has completely different values.<br>
> In the spec is says that it should be:<br>
> A R<br>
> G B<br>
> But mine are:<br>
> G A<br>
> R B<br>
> <br>
> My theory is that this might be an error in the Intel implementation,<br>
> simply because they implemented it with the same swizzle as in<br>
> Gather/textureGather.<br>
If it were<br>
G B<br>
A R<br>
<br>
I could try to explain it away with a top left vs bottom left coordinate<br>
origin, but the swizzle you actually see I have no idea...<br>
<br>
</blockquote></div>