Bug 36033 - main/shaderapi.c:1044: validate_samplers: Assertion `(sizeof(targetName)/sizeof(*(targetName))) == NUM_TEXTURE_TARGETS' failed.
main/shaderapi.c:1044: validate_samplers: Assertion `(sizeof(targetName)/size...
Product: Mesa
Classification: Unclassified
Component: Mesa core
x86 (IA32) Linux (All)
: medium critical
Assigned To: Brian Paul
Depends on:
  Show dependency treegraph
Reported: 2011-04-06 10:56 UTC by Vinson Lee
Modified: 2011-04-06 14:28 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Note You need to log in before you can comment on or make changes to this bug.
Description Vinson Lee 2011-04-06 10:56:50 UTC
mesa: cd2857fae16e1352f39b37f611797e66619d3fe5 (master)

Run glean api2 test on swrast, softpipe, or llvmpipe. The test now triggers an assert but previously passed.

$ ./bin/glean -r results -t api2 --quick
glean: main/shaderapi.c:1044: validate_samplers: Assertion `(sizeof(targetName)/sizeof(*(targetName))) == NUM_TEXTURE_TARGETS' failed.

(gdb) bt
#0  0x004a0416 in __kernel_vsyscall ()
#1  0x00607941 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#2  0x0060ae42 in abort () at abort.c:92
#3  0x006008e8 in __assert_fail (assertion=0xddf264 "(sizeof(targetName)/sizeof(*(targetName))) == NUM_TEXTURE_TARGETS", file=0xddef6d "main/shaderapi.c", line=1044, 
    function=0xddf5f9 "validate_samplers") at assert.c:81
#4  0x00baec86 in validate_samplers (prog=0xa0d9738, errMsg=0xbf9b79e8 "\030z\233\277\365\023\273") at main/shaderapi.c:1044
#5  0x00baecc8 in validate_shader_program (shProg=0xa1c4de0, errMsg=0xbf9b79e8 "\030z\233\277\365\023\273") at main/shaderapi.c:1111
#6  0x00baed5a in validate_program (ctx=0x9f81040, program=3) at main/shaderapi.c:1136
#7  0x00bb00a9 in _mesa_ValidateProgramARB (program=3) at main/shaderapi.c:1636
#8  0x080c39b0 in GLEAN::API2Test::testShaderObjectFuncs (this=0x81bb060) at piglit/tests/glean/tapi2.cpp:456
#9  0x080c4df3 in GLEAN::API2Test::runSubTests (this=0x81bb060, r=...) at piglit/tests/glean/tapi2.cpp:1005
#10 0x080c4e67 in GLEAN::API2Test::runOne (this=0x81bb060, r=..., w=...) at piglit/tests/glean/tapi2.cpp:1022
#11 0x080c599e in GLEAN::BaseTest<GLEAN::MultiTestResult>::run (this=0x81bb060, environment=...) at piglit/tests/glean/tbase.h:325
#12 0x080bdcc6 in main (argc=7, argv=0xbf9b7dd4) at piglit/tests/glean/main.cpp:141
(gdb) frame 4
#4  0x00baec86 in validate_samplers (prog=0xa0d9738, errMsg=0xbf9b79e8 "\030z\233\277\365\023\273") at main/shaderapi.c:1044
1044	   assert(Elements(targetName) == NUM_TEXTURE_TARGETS);
(gdb) print targetName
$5 = {0xddf60b "TEXTURE_2D_ARRAY", 0xddf61c "TEXTURE_1D_ARRAY", 0xddf62d "TEXTURE_CUBE", 0xddf63a "TEXTURE_3D", 0xddf645 "TEXTURE_RECT", 0xddf652 "TEXTURE_2D", 
  0xddf65d "TEXTURE_1D"}
(gdb) print /x NUM_TEXTURE_TARGETS
$6 = 0x8
Comment 1 Vinson Lee 2011-04-06 11:26:57 UTC
874a2c0b7da62f4dd08dedcec221f55b22e40e95 is the first bad commit
commit 874a2c0b7da62f4dd08dedcec221f55b22e40e95
Author: Brian Paul <brianp@vmware.com>
Date:   Tue Apr 5 19:02:07 2011 -0600

    mesa: core support for GL_ARB_texture_buffer_object
    No GLSL or driver support yet.

:040000 040000 1ab1833ca3aabb5912738ada9339bb83108d4929 9b1eef1af2cddc4aeca9fa473f29afab210face8 M	src
bisect run success
Comment 2 Brian Paul 2011-04-06 11:34:30 UTC
Fixed with c1f4b2364f473910667ab97d6599619003639d39
Comment 3 Vinson Lee 2011-04-06 14:28:48 UTC
mesa: 3f8455d07b129062885f58237516ae0d1aa339ea (master)

Verified fixed.