Bug 29500 - [glsl2]Mesa demo shadow_sampler fail to run with error: `shadow2DRectProj' undeclared
Summary: [glsl2]Mesa demo shadow_sampler fail to run with error: `shadow2DRectProj' un...
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: All Linux (All)
: medium major
Assignee: Kenneth Graunke
QA Contact:
Depends on:
Blocks: 29044
  Show dependency treegraph
Reported: 2010-08-10 22:27 UTC by wang,jinjin
Modified: 2010-08-16 18:00 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Description wang,jinjin 2010-08-10 22:27:30 UTC
System Environment:
Arch:       x86_64
Platform:   Calpella/Piketon
Libdrm:         (master)2.4.21-15-gb04515c5d6c95f573457a94267b855cceb639105
Mesa:           (glsl2)f8d2cfe4a699faebd42bd1874ef0329d37791dd7
Xserver:                (master)xorg-server-
Cairo:          (master)046b642db0782ab5e2a5c82988b21e05afe8e716
Kernel: (for-linus)9fe6206f400646a2322096b56c59891d530e8d51

Bug detailed description:
With Mesa (glsl2)f8d2cfe4a699faebd42bd1874ef0329d37791dd7, Mesa demos
shadow_sampler failed as the same as using LIBGL_ALWAYS_SOFTWARE=1.But with Mesa (master) cc732bf894f58fd1533709ac60d3af4c80bd01b0 it run correctly.

Reproduce steps:
3. LIBGL_ALWAYS_SOFTWARE=1 ./shadow_sampler 

Fail messages:
GL_RENDERER = Mesa DRI Intel(R) Ironlake Desktop GEM 20100330 DEVELOPMENT
fslight: problem compiling shader:
0:0(0): error: function `shadow2DRectProj' undeclared
Comment 1 Kenneth Graunke 2010-08-13 05:16:53 UTC
Yeah, for some reason I seem to have totally forgot those.  I added them in my builtins rework, so once that lands, this should work.
Comment 2 Ian Romanick 2010-08-13 19:29:32 UTC
There are now piglit test cases tex_rect-0[4-8].frag.  Fixed by:

commit 9364ad8528b8482afd01aab9b5ebe8c9176883df
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Fri Aug 13 17:46:25 2010 -0700

    glsl2/Makefile: Add a 'make builtins' target.
    This copies over a dummy builtin_functions.cpp and rebuilds a
    bootstrapped version of the compiler, then uses that to generate the
    proper list of builtins.  Finally, it rebuilds the compiler with the new
    Unfortunately, it's no longer automatic, but at least it works.

commit 43ff8f1a4b90554eae489cebb7e05f983dd9ad66
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Wed Aug 11 16:53:52 2010 -0700

    glsl2: Rework builtin function generation.
    Each language version/extension and target now has a "profile" containing
    all of the available builtin function prototypes.  These are written in
    GLSL, and come directly out of the GLSL spec (except for expanding genType).
    A new builtins/ir/ folder contains the hand-written IR for each builtin,
    regardless of what version includes it.  Only those definitions that have
    prototypes in the profile will be included.
    The autogenerated IR for texture builtins is no longer written to disk,
    so there's no longer any confusion as to what's hand-written or
    All scripts are now in python instead of perl.

commit d802ba110f78c3eee9541867cde819ada1b2c449
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Thu Aug 12 13:17:53 2010 -0700

    ir_reader: Don't mark functions as defined if their body is empty.
Comment 3 wang,jinjin 2010-08-15 19:47:59 UTC
With the newest mesa commit 83baa8a6c5541829003bbffe1d2b8cee5a0263fd, Mesa demo shadow_sampler still fail to run with new error:"shadow_sampler: program/ir_to_mesa.cpp:2094: virtual void ir_to_mesa_visitor::visit(ir_texture*): Assertion `!"FINISHME: other texture targets"' failed.
Aborted (core dumped)"
Comment 4 Ian Romanick 2010-08-16 10:00:07 UTC
Please REOPEN bugs that are not actually fixed.  Otherwise the bugs do not appear in searches.  This makes them unlikely to get fixed.

The assertion failure should be fixed by the following commit.  I verified that shadow_sampler runs.  If we care about this test case, it should be incorporated into piglit.

commit 0bf63733e54b47daf9f50c32a1fca4039c82def2
Author: Ian Romanick <ian.d.romanick@intel.com>
Date:   Mon Aug 16 09:39:58 2010 -0700

    ir_to_mesa: Support texture rectangle targets
Comment 5 wang,jinjin 2010-08-16 18:00:45 UTC
Thanks for your advise,Ian Romanick.I verified it can run with the commit  0bf63733e54b47daf9f50c32a1fca4039c82def2 and the newest commit a433cd286c60eb9d4c2114f042709eda0f3de676

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.