Bug 43580

Summary: CoreBreach: Flames not rendered correctly
Product: Mesa Reporter: Sven Arvidsson <sa>
Component: Drivers/DRI/i965Assignee: Ian Romanick <idr>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: jjardon
Version: 7.11   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Screenshot

Description Sven Arvidsson 2011-12-07 08:25:08 UTC
Created attachment 54188 [details]
Screenshot

The flames from the ship in the game CoreBreach does not render correctly on i965. This bug is affects both 7.11 and git master.

CoreBreach is so far only available as beta for Linux:
http://corebreach.corecode.at/CoreBreach-1.1-beta4-linux32.tar.bz2
http://corebreach.corecode.at/CoreBreach-1.1-beta4-linux64.tar.bz2

System environment:
-- chipset: G45 / ICH10R
-- system architecture: 32-bit
-- Linux distribution: Debian unstable
-- Machine or mobo model: Asus P5Q-EM
-- Display connector: DVI
-- xf86-video-intel: 2.17.0
-- xserver: 1.11.1.902
-- mesa: 
-- drm: 2.4.27
-- kernel: 3.1.1
Comment 1 corecode 2011-12-08 03:26:55 UTC
FYI the "flame" is a normal point sprite particle system with alpha blended particles, except that it uses the GL_CONSTANT_COLOR_EXT extension, maybe thats the source of the problem


        glEnable(GL_BLEND);
        glBlendColor(0.99, 0.94, 0.97, 0.4);
        glBlendFunc(GL_SRC_ALPHA, GL_CONSTANT_COLOR_EXT);
        glEnable(GL_POINT_SPRITE);
        glDrawArrays(GL_POINTS, 0, particleCount);


the fragment shader is very simple:


uniform float 	intensity;
uniform sampler2D 	pointspriteTexture;
void main()
{
	gl_FragColor = texture2D(pointspriteTexture, gl_PointCoord);
	gl_FragColor.w *= intensity;
}
Comment 2 Eric Anholt 2012-08-13 01:17:04 UTC
This should be fixed as of:

commit 43af02ac731dac7d80f7e47feb0c80e4da156769
Author: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Date:   Mon Feb 27 15:46:32 2012 +0800

    i965: handle gl_PointCoord for Gen4 and Gen5 platforms

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.