[Mesa-dev] Mesa (master): mesa/formats: Add layout and swizzle information

Jason Ekstrand jason at jlekstrand.net
Wed Aug 13 10:34:21 PDT 2014


On Tue, Aug 12, 2014 at 8:52 PM, Roland Scheidegger <sroland at vmware.com>
wrote:

> Am 06.08.2014 11:28, schrieb Michel Dänzer:
> > On 06.08.2014 03:08, Jason Ekstrand wrote:
> >> Module: Mesa
> >> Branch: master
> >> Commit: 850fb0d1dca616179d3239a7b7bd94fe1979604c
> >> URL:
> https://urldefense.proofpoint.com/v1/url?u=http://cgit.freedesktop.org/mesa/mesa/commit/?id%3D850fb0d1dca616179d3239a7b7bd94fe1979604c&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=F4msKE2WxRzA%2BwN%2B25muztFm5TSPwE8HKJfWfR2NgfY%3D%0A&m=M3mfjwgruJzPHL55%2BrGtDjCQ6DTQMURIoUjKbv00MIU%3D%0A&s=af10bfc26af3611fea43b64de32c55e38bc2721b145a63dcde3f0085fcd850d7
> >>
> >> Author: Jason Ekstrand <jason.ekstrand at intel.com>
> >> Date:   Thu Jul 10 23:59:42 2014 -0700
> >>
> >> mesa/formats: Add layout and swizzle information
> >>
> >> v2: Move the MESA_FORMAT_SWIZZLE enum to the top of the file
> >>
> >> Signed-off-by: Jason Ekstrand <jason.ekstrand at intel.com>
> >> Reviewed-by: Brian Paul <brianp at vmware.com>
> >
> > As of this commit, ~20 depth/stencil related piglit tests have regressed
> with the radeonsi driver compared to before your changes. See below for an
> example failure of the draw-pixels test.
> >
>
> There's actually more breakage due to this at least in gallium based
> drivers though unfortunately there's no piglit test catching it (conform
> drawpix does). I'm not sure if this is along similar lines to the issues
> with stencil index, but drawpixel with GL_COLOR_INDEX data is busted -
> it'll actually report a mesa implementation error because the
> COLOR_INDEX_DATA is passed through to the texstore functions, and the
> new texstore_swizzle() function can't handle this.
> Backtrace from the error looks like this:
>
> #0  get_map_idx (value=6400) at src/mesa/main/texstore.c:245
> #1  0x00007ffff3ee0f56 in compute_component_mapping (inFormat=6400,
>     outFormat=6408, map=0x7fffffffb310 "@\263\377\377\377\177")
>     at src/mesa/main/texstore.c:264
> #2  0x00007ffff3ee4312 in texstore_swizzle (ctx=0x7ffff7fd3010, dims=2,
>     baseInternalFormat=6408, dstFormat=MESA_FORMAT_R8G8B8A8_UNORM,
>     dstRowStride=192, dstSlices=0x7fffffffb4a0, srcWidth=40, srcHeight=40,
>     srcDepth=1, srcFormat=6400, srcType=5121, srcAddr=0x8aa980,
>     srcPacking=0x7fffffffb590) at src/mesa/main/texstore.c:1529
> #3  0x00007ffff3ee4cc6 in texstore_rgba (ctx=0x7ffff7fd3010, dims=2,
>     baseInternalFormat=6408, dstFormat=MESA_FORMAT_R8G8B8A8_UNORM,
>     dstRowStride=192, dstSlices=0x7fffffffb4a0, srcWidth=40, srcHeight=40,
>     srcDepth=1, srcFormat=6400, srcType=5121, srcAddr=0x8aa980,
>     srcPacking=0x7fffffffb590) at src/mesa/main/texstore.c:1730
> #4  0x00007ffff3ee5190 in _mesa_texstore (ctx=0x7ffff7fd3010, dims=2,
>     baseInternalFormat=6408, dstFormat=MESA_FORMAT_R8G8B8A8_UNORM,
>     dstRowStride=192, dstSlices=0x7fffffffb4a0, srcWidth=40, srcHeight=40,
>     srcDepth=1, srcFormat=6400, srcType=5121, srcAddr=0x8aa980,
>     srcPacking=0x7fffffffb590) at src/mesa/main/texstore.c:1871
> #5  0x00007ffff40876c2 in make_texture (st=0x8367d0, width=40, height=40,
>     format=6400, type=5121, unpack=0x7fffffffb590, pixels=0x8aa980)
>     at src/mesa/state_tracker/st_cb_drawpixels.c:540
> #6  0x00007ffff40895ee in st_DrawPixels (ctx=0x7ffff7fd3010, x=0, y=0,
>     width=40, height=40, format=6400, type=5121, unpack=0x7fffffffb590,
>     pixels=0x8aa980) at src/mesa/state_tracker/st_cb_drawpixels.c:1170
> #7  0x00007ffff3f7cfb2 in _mesa_DrawPixels (width=40, height=40,
> format=6400,
>     type=5121, pixels=0x8aa980) at src/mesa/main/drawpix.c:162
>
> I can't quite see if that is even supposed to work or if the state
> tracker needs to handle it (it used to work at least somehow), though
> quickly disabling texstore_swizzle() does fix it (doesn't help all that
> much though since the test will then later complain about other cases
> though maybe these are due to the different snorm formulas, as it
> happens with GL_BYTE/GL_RGB type/format).
>
> Any ideas?
>

Yeah, I forgot about the color-index formats since mesa doesn't handle them
as internal formats anymore.  I'll send out a patch that I *think* will fix
it.  If you could give it a try, that would be great.
-- Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140813/d2aafd6e/attachment-0001.html>


More information about the mesa-dev mailing list