Bug 32273 - assertion fails when starting vdrift 2010 release with shaders enabled
Summary: assertion fails when starting vdrift 2010 release with shaders enabled
Status: RESOLVED DUPLICATE of bug 32287
Alias: None
Product: Mesa
Classification: Unclassified
Component: glsl-compiler (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Ian Romanick
QA Contact:
Depends on:
Reported: 2010-12-09 10:05 UTC by almos
Modified: 2010-12-11 16:37 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Description almos 2010-12-09 10:05:28 UTC
The console output is the following:
radeon: Successfully grabbed chipset info from kernel!
radeon: DRM version: 2.0.0 ID: 0x4152 GB: 1 Z: 1
radeon: GART size: 253 MB VRAM size: 128 MB
radeon: HyperZ: NO
INFO: Display change was successful: 1024x768x32 16z fullscreen=0
INFO: Video card information:
      Vendor: X.Org R300 Project
      Renderer: Gallium 0.4 on ATI RV350
      Version: 2.1 Mesa 7.10-devel
      Maximum texture size: 2048
      Maximum varying floats: 32
      Using GLEW 1.5.4
INFO: Maximum color attachments: 8
INFO: Maximum draw buffers (1 required): 4
INFO: Texture units: 8 full, 16 partial
INFO: Loaded shader package simple
INFO: Loaded shader package simple, variant simple_premult
INFO: Loaded shader package simple, variant simple_gamma_premult
INFO: Loaded shader package simple, variant simple_gamma
INFO: Loaded shader package simple, variant simplecar
INFO: Loaded shader package logluminance
INFO: Loaded shader package logluminance, variant logluminance_tiny
INFO: Loaded shader package tonemap
INFO: Loaded shader package gbufferfill
INFO: Loaded shader package gbufferfill, variant gbufferfillcar
vdrift: ir_constant_expression.cpp:134: virtual ir_constant* ir_expression::constant_expression_value(): Assertion `op[0]->type->base_type == GLSL_TYPE_INT' failed.
SIGABRT detected, releasing the mouse
Comment 1 Ian Romanick 2010-12-09 13:34:30 UTC
Is the shader source for this application available?

Something strange is happening here.  The assertion that is hit occurs while the compiler is trying to constant-fold int-to-float operations.  The type of the source should be int, but it's not.

Can you run this application in GDB and 'up' until GDB says it's in ir_expression::constant_expression_value.  Then 'print op[0]->type->name' and 'print op[0]->type->base_type'.
Comment 2 almos 2010-12-09 15:58:59 UTC
The shader sources are available in the data/shaders dir in the game tarball. gdb says it tried to compile data/shaders/lightaccumulate/fragment.glsl when the assert happened.

the types according to gdb:
(gdb) f 4
#4  0xabd722cf in ir_expression::constant_expression_value (this=0x8535620)
    at ir_constant_expression.cpp:134
134	      assert(op[0]->type->base_type == GLSL_TYPE_INT);
(gdb) print op[0]->type->name
$1 = 0x83bd168 "float"
(gdb) print op[0]->type->base_type
Comment 3 Ian Romanick 2010-12-09 23:24:45 UTC
This bug has *NOTHING* to do with the r300 driver.  The issue is completely in the GLSL compiler.  Please don't change the component back.  I set the component to glsl-compiler intentionally.
Comment 4 almos 2010-12-10 03:05:47 UTC
Sorry, I didn't do it intentionally. I had the bug opened in a tab, got your mail, did a refresh before posting the reply  and the checkbox remained at r300g instead of changing into your setting. I hope it stays OK now.
Comment 5 Ian Romanick 2010-12-10 19:54:44 UTC
It looks like this is the same problem as bug #32287.  Could you check to see if the commit mentioned there fixes this problem?  If that commit fixes this problem, we'll close this bug as a duplicate of #32287.  That bug is remaining open until the patch is cherry-picked back to 7.10 and 7.9 release branches.
Comment 6 almos 2010-12-11 08:18:44 UTC
Yes, that commit fixed this problem.
Comment 7 Ian Romanick 2010-12-11 16:37:57 UTC

*** This bug has been marked as a duplicate of bug 32287 ***

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.