nouveau: Regression in getteximage-targets 3D
The piglit test getteximage-targets 3D has regressed with nouveau on a kepler card.
I've bisected the regression down to:
96a0f886a7c6086ba9b654d94d250b81fd1c7b10 is the first bad commit
commit 96a0f886a7c6086ba9b654d94d250b81fd1c7b10
Author: Emma Anholt <emma@anholt.net>
Date: Thu May 18 13:01:27 2023 -0700
mesa: Port the pbo.use_gs path to NIR and let it get used on NIR drivers.
Now that everyone but SVGA is requesting NIR, this path had been
effectively disabled. I had done a partial port of the VS side in
9143c08125a3 ("st/nir: Fix the st->pbo.use_gs case.") for the sake of
nv50, but with it should be ready for all drivers. Affects nv50, v3d,
d3d12, svga (I think).
Note that this GS code is slightly different from the TGSI: We put a 0 in
pos.z, rather than leaving the layer value there, because apparently v3d
didn't like those denorm Z values.
Also, it's nice to see that the NIR code is shorter than the TGSI code
was, we've made great progress on nir_builder.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23114>
src/mesa/state_tracker/st_pbo.c | 63 ++++++++++++++++++-----------------------
1 file changed, 28 insertions(+), 35 deletions(-)
It's easy to reproduce on my machine. Example test output:
[mesa] [m@asuslaptop build]$ ninja && DRI_PRIME=1 PIGLIT_PLATFORM=wayland /home.ext4/m/comp/mesa/piglit/bin/getteximage-targets 3D -auto -fbo
[1/23] Generating src/git_sha1.h with a custom command
Testing GL_TEXTURE_3D into PBO
GetTexImage() returns incorrect data in byte 0 for layer 0
corresponding to (0,0), channel 0
expected: 8
got: 0
GetTexImage() returns incorrect data in byte 2 for layer 1
corresponding to (0,0), channel 2
expected: 30
got: 15
GetTexImage() returns incorrect data in byte 2 for layer 2
corresponding to (0,0), channel 2
expected: 45
got: 30
GetTexImage() returns incorrect data in byte 2 for layer 3
corresponding to (0,0), channel 2
expected: 60
got: 45
GetTexImage() returns incorrect data in byte 2 for layer 4
corresponding to (0,0), channel 2
expected: 75
got: 60
GetTexImage() returns incorrect data in byte 2 for layer 5
corresponding to (0,0), channel 2
expected: 90
got: 75
GetTexImage() returns incorrect data in byte 2 for layer 6
corresponding to (0,0), channel 2
expected: 105
got: 90
GetTexImage() returns incorrect data in byte 2 for layer 7
corresponding to (0,0), channel 2
expected: 120
got: 105
GetTexImage() returns incorrect data in byte 2 for layer 8
corresponding to (0,0), channel 2
expected: 135
got: 120
GetTexImage() returns incorrect data in byte 2 for layer 9
corresponding to (0,0), channel 2
expected: 150
got: 135
GetTexImage() returns incorrect data in byte 2 for layer 10
corresponding to (0,0), channel 2
expected: 165
got: 150
GetTexImage() returns incorrect data in byte 2 for layer 11
corresponding to (0,0), channel 2
expected: 180
got: 165
GetTexImage() returns incorrect data in byte 2 for layer 12
corresponding to (0,0), channel 2
expected: 195
got: 180
GetTexImage() returns incorrect data in byte 2 for layer 13
corresponding to (0,0), channel 2
expected: 210
got: 195
GetTexImage() returns incorrect data in byte 2 for layer 14
corresponding to (0,0), channel 2
expected: 225
got: 210
GetTexImage() returns incorrect data in byte 2 for layer 15
corresponding to (0,0), channel 2
expected: 240
got: 225
Testing GL_TEXTURE_3D into client array
PIGLIT: {"result": "fail" }
cc @anholt