Bug 29496 - [glsl2]Mesa noise(2) demo renders incorrectly on glsl2 branch
Summary: [glsl2]Mesa noise(2) demo renders incorrectly on glsl2 branch
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: All Linux (All)
: medium normal
Assignee: Eric Anholt
QA Contact:
Depends on:
Blocks: 29044
  Show dependency treegraph
Reported: 2010-08-10 20:32 UTC by wang,jinjin
Modified: 2010-09-12 20:08 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:

glsl2 noise2 test picture (15.20 KB, image/x-png)
2010-08-10 20:32 UTC, wang,jinjin
master noise2 test picture (33.03 KB, image/png)
2010-08-10 20:35 UTC, wang,jinjin

Description wang,jinjin 2010-08-10 20:32:48 UTC
Created attachment 37780 [details]
glsl2 noise2 test picture

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
Noise2 display incorrectly  the same as using LIBGL_ALWAYS_SOFTWARE=1.But with Mesa (master) cc732bf894f58fd1533709ac60d3af4c80bd01b0 it run correctly.

Reproduce steps:
Comment 1 wang,jinjin 2010-08-10 20:35:32 UTC
Created attachment 37781 [details]
master noise2 test picture
Comment 2 Kenneth Graunke 2010-08-14 00:22:32 UTC
This is probably because all of our noise functions are "return 0".  idr, I seem to recall you saying you had a nice implementation of these in GLSL?  I'd be happy to integrate that if you send me a copy.
Comment 3 wang,jinjin 2010-08-15 18:07:16 UTC
Mesa demo noise has the same probloms as noise2 on glsl2 branch.
Comment 4 Ian Romanick 2010-09-09 15:49:03 UTC
Original behavior restored by the patches below.  There's still more work to be done here as i965 has no noise support now.  Also, emitting a noise opcode instead of a noise function is just silly.

commit 1f3c7d968c4313dbb71bc93306556cc9292d06ef
Author: Ian Romanick <ian.d.romanick@intel.com>
Date:   Wed Sep 1 21:23:52 2010 -0700

    glsl2: Implement noise[1234] built-in functions using ir_unop_noise

commit 2b70dbfe091af5ae7c788e16275e1af2cb1c284c
Author: Ian Romanick <ian.d.romanick@intel.com>
Date:   Thu Sep 9 15:25:32 2010 -0700

    glsl2: Add EmitNoNoise flag, use it to remove noise opcodes

commit 547131ac8750acabd030972fc768705c13d19ef7
Author: Ian Romanick <ian.d.romanick@intel.com>
Date:   Thu Sep 9 15:20:09 2010 -0700

    glsl2: Add lowering pass to remove noise opcodes

commit 3a5ce85cfa4914711e56c8cf831699242618928e
Author: Ian Romanick <ian.d.romanick@intel.com>
Date:   Wed Sep 1 21:12:10 2010 -0700

    glsl2: Add ir_unop_noise
Comment 5 wang,jinjin 2010-09-12 18:43:46 UTC
I tested it with the newest commit c4046d4fda2fe838659bff99bfa17f57f895a943. It can just run correctly when using LIBGL_ALWAYS_SOFTWARE=1. That is same as bug#29524

Thanks !!
Comment 6 wang,jinjin 2010-09-12 20:08:36 UTC
I filed a new bug#30153 to specify.

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.