[PATCH v2 1/4] d3d9/tests: Add Fetch4 tests

Axel Davy davyaxel0 at gmail.com
Sat Jan 26 17:55:08 CST 2019


Hi,

I'm trying to implement FETCH4 as well for nine. Unfortunately, my 
windows test system died, thus I rely on your experiments.

I experimented with 3DMark06, disabling support for D24X8 texturing to 
force FETCH4.
I noticed a few things:
. FETCH4 is used for DF24 sampling. A small -0.0002 offset is added to 
the coordinates.
. For some calls it sets FETCH4 on DXT1 cube textures.
. The texturing support for D24X8 is fetched with usage=0x20002, ie with 
D3DUSAGE_QUERY_FILTER. I guess this checks PCF support.

My initial patch just let FETCH4 trigger gather4 for the red channel for 
any texture.
This seems to be wrong though as the game renders black and white as a 
result.

Clearly looking at how the shader is using the tex output, it was 
expecting the FETCH4 on the DXT1 cube texture to be a normal tex 
instruction. There may also be other weird usages I missed.

My understanding of the wine proposed patchset is that you shouldn't hit 
the same problem as you restrict FETCH4 support for only a small subset 
of textures.
That raises some other questions, though: Do FETCH4 on some non-FETCH4 
texture do really nothing ? I mean, maybe just like for the FETCH4 
formats, it's possible projection, lod, etc get ignored.

Axel

On 25/01/2019 19:24, Stefan Dösinger wrote:
> Am 25.01.19 um 17:57 schrieb Stefan Dösinger:
>> Maybe I'll get around to installing Windows 10 on my new Mac with an AMD
>> Polaris GPU. That should give some clues how the behavior developed
>> since then.
> I totally forgot that I had a desktop box with a Radeon RX 580 card
> (Polaris I think) and Windows 10 under my desk. Attached are results
> with your filtering settings and point filtering everywhere.
>
> On a quick look it seems that it also has the 0.5 texel offset, but has
> some precision issues with the colors it writes. You may have to
> increase the allowed slop in the color comparisons. Maybe you can also
> add or subtract one from the expected results and keep everything happy
> with the current slop.
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20190127/1c673ffb/attachment.html>


More information about the wine-devel mailing list