[radeonsi] bottom mips of height=1 2D texture is uninitialised after upload
When creating a 2D texture with a height of 1 and more than 2 mips, the bottom mip seems to be uninitialised.
In this test case (attached: tex2d_height1_uninit.cpp) The expected output is a blue/green two-tone quad for three cases, and a blue/green/purple quad for the fourth):
But when running on mesa built from 072e95e0 on an RX 480 I get corrupted/uninitialised memory for one of the quads:
Running with AMD_DEBUG=zerovram
causes the quad to consistently show up as black (otherwise it's random) so this looks like uninitialised memory. If I add AMD_DEBUG=notiling
then the bug goes away.
The data is uploaded with a glTexSubImage2D
call, and the texture is RGBA16
- I think it reproduces with any format but this is the one I built the test case around because it showed up first alphabetically in my failed cases.
From testing this only happens when the base level is height 1. The corrupted texture is 2D with base level 8x1 and two mips 4x1 and 2x1 (the bottom mip is the one being displayed in each case). The others are (bottom-left) a 1D texture that's base=8 and mips=4,2 as well as (top-left) a 2D texture that's base 8x2 and mips=4x1,2x1 (so the bottom mip is the same dimension, but does not repro) as well as (top-right) a 2D texture that's base 8x8 and mips 4x4,2x2.