mesa: 9228bfb37519e4a03183ec89e82a80f39addeeeb (master) $ ./build/linux-x86-debug/bin/lp_test_format [...] Testing PIPE_FORMAT_R8G8B8X8_UNORM (float) ... Testing PIPE_FORMAT_R8G8B8X8_UNORM (unorm8) ... Testing PIPE_FORMAT_B4G4R4X4_UNORM (float) ... Testing PIPE_FORMAT_B4G4R4X4_UNORM (unorm8) ... src/gallium/auxiliary/gallivm/lp_bld_format_yuv.c:422:lp_build_fetch_subsampled_rgba_aos: Assertion `format_desc->block.width == 2' failed. (gdb) bt #0 0x0805cf2b in _debug_assert_fail (expr=0x8791c57 "format_desc->block.width == 2", file=0x8791b00 "src/gallium/auxiliary/gallivm/lp_bld_format_yuv.c", line=422, function=0x8791ca0 "lp_build_fetch_subsampled_rgba_aos") at src/gallium/auxiliary/util/u_debug.c:282 #1 0x0808c23b in lp_build_fetch_subsampled_rgba_aos (gallivm=0x9986448, format_desc=0x8897aa0, n=1, base_ptr=0x99a77b0, offset=0x99b8828, i=0x99ee4c8, j=0x99e2968) at src/gallium/auxiliary/gallivm/lp_bld_format_yuv.c:422 #2 0x0808a7e6 in lp_build_fetch_rgba_aos (gallivm=0x9986448, format_desc=0x8897aa0, type=..., base_ptr=0x99a77b0, offset=0x99b8828, i=0x99ee4c8, j=0x99e2968) at src/gallium/auxiliary/gallivm/lp_bld_format_aos.c:486 #3 0x0805a326 in add_fetch_rgba_test (gallivm=0x9986448, verbose=0, desc=0x8897aa0, type=...) at src/gallium/drivers/llvmpipe/lp_test_format.c:116 #4 0x0805a416 in test_format_float (gallivm=0x9986448, verbose=0, fp=0x0, desc=0x8897aa0) at src/gallium/drivers/llvmpipe/lp_test_format.c:152 #5 0x0805aac8 in test_one (gallivm=0x9986448, verbose=0, fp=0x0, format_desc=0x8897aa0) at src/gallium/drivers/llvmpipe/lp_test_format.c:312 #6 0x0805ab79 in test_all (gallivm=0x9986448, verbose=0, fp=0x0) at src/gallium/drivers/llvmpipe/lp_test_format.c:353 #7 0x0805abc3 in test_some (gallivm=0x9986448, verbose=0, fp=0x0, n=1000) at src/gallium/drivers/llvmpipe/lp_test_format.c:366 #8 0x0805bc41 in main (argc=1, argv=0xbfb9d394) at src/gallium/drivers/llvmpipe/lp_test_main.c:401 (gdb) frame 1 #1 0x0808c23b in lp_build_fetch_subsampled_rgba_aos (gallivm=0x9986448, format_desc=0x8897aa0, n=1, base_ptr=0x99a77b0, offset=0x99b8828, i=0x99ee4c8, j=0x99e2968) at src/gallium/auxiliary/gallivm/lp_bld_format_yuv.c:422 422 assert(format_desc->block.width == 2); (gdb) print format_desc->block.width $1 = 1 (gdb) print format_desc->block $2 = {width = 1, height = 1, bits = 32} (gdb) print *format_desc $4 = {format = PIPE_FORMAT_YV12, name = 0x873f340 "PIPE_FORMAT_YV12", short_name = 0x873f351 "yv12", block = {width = 1, height = 1, bits = 32}, layout = UTIL_FORMAT_LAYOUT_SUBSAMPLED, nr_channels = 4, is_array = 0, is_bitmask = 0, is_mixed = 0, channel = {{type = 0, normalized = 0, size = 8}, {type = 0, normalized = 0, size = 8}, {type = 0, normalized = 0, size = 8}, {type = 0, normalized = 0, size = 8}}, swizzle = "\000\001\002\003", colorspace = UTIL_FORMAT_COLORSPACE_YUV, unpack_rgba_8unorm = 0x80823ec <util_format_yv12_unpack_rgba_8unorm>, pack_rgba_8unorm = 0x80823f1 <util_format_yv12_pack_rgba_8unorm>, fetch_rgba_8unorm = 0, unpack_rgba_float = 0x80823f6 <util_format_yv12_unpack_rgba_float>, pack_rgba_float = 0x80823fb <util_format_yv12_pack_rgba_float>, fetch_rgba_float = 0x8082400 <util_format_yv12_fetch_rgba_float>, unpack_z_32unorm = 0, pack_z_32unorm = 0, unpack_z_float = 0, pack_z_float = 0, unpack_s_8uscaled = 0, pack_s_8uscaled = 0}
git bisect good 898be7d5acc27e2e0dfa8c2f27dc4fd7085fb476
The regression is introduced at commit ed24e19070b7dff12670151b2d184f31c845ccae. commit ed24e19070b7dff12670151b2d184f31c845ccae Merge: 85e1fa5 a2a6799 Author: Christian König <deathsimple@vodafone.de> Date: Wed Jul 13 22:56:06 2011 +0200 Merge branch 'pipe-video'
Sorry for the late reply, the problem seems to be the new texture formats. Unfortunately I'm in Canada right now and can't work on it from here, I will take a look at it as soon as I'm back home.
YV12 is a planar format, so it should be described as a planar formar in u_format.csv, and at least ignored on every place that doesn't know how to handle planar formats.
Changing YV12 and the other new formats added with the pipe-video merge from "subsampled," to "other" indeed fixes the bug and doesn't seems to have any negative consequences. I think adding new "planar" and "indexed" options would be more clean, but I have no idea about the consequences for other parts of gallium. Any advise on this?
Created attachment 49482 [details] [review] Possible fix
(In reply to comment #5) > Changing YV12 and the other new formats added with the pipe-video merge from > "subsampled," to "other" indeed fixes the bug and doesn't seems to have any > negative consequences. > > I think adding new "planar" and "indexed" options would be more clean, but I > have no idea about the consequences for other parts of gallium. > > Any advise on this? Adding "planar"/"indexed" would be cleaner but it would imply adding UTIL_FORMAT_LAYOUT_PLANAR/UTIL_FORMAT_LAYOUT_INDEXED in u_format, and handle everywhere. So until there is an actual use case for doing so, your patch of using other seems fine.
Akk, patch is pushed.
mesa: 120d71a45cfda1edfa8cd6b1732e209eb98b53d8 (master) Verified fixed.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.