View Full Version : gl_FrontFacing crash (ATI driver problem?)
11-07-2005, 04:32 AM
gl_Position = ftransform();
if( !gl_FrontFacing )
gl_FragColor = vec4(1,1,1,1);
gl_FragColor = vec4(0.2,0.2,0.2,1);
}the following shader crashes on ATI during glDrawElements(). :(
did anyone got around to support two sided rendering on both ATI & NV? if so, how do you detect ATI & NV reliably and future proof or do you perhaps use a generic view vector dot face normal test or .. hmm .. some other method?
a while ago there was http://www.opengl.org/discussion_boards/cgi_directory/ultimatebb.cgi?ubb=get_topic;f=11;t=000411 behaviour but I suppose it regressed to a crash now.
drivers: ATI Catalyst 5.6, 5.10, 5.11 BETA
HW: ATI 9600XT
11-07-2005, 05:04 AM
Using gl_FrontColor and gl_BackColor in the vertex shader and then reading gl_Color in the fragment shader works.
11-07-2005, 02:08 PM
Color trick works only partially for me - only for really simple shaders. On more complex ones, adding gl_BackColor = vec4(0.0,0.0,0.0,1.0) to the vertex shader disables the output alltogether.
I could drill down to the smallest possible shader which triggers the case, but that will take time. Anyone from ATI willing to accept the distilled test case?
11-07-2005, 02:42 PM
I'm always willing to accept test cases. (epersson 'at' ati.com).
Using gl_FrontFacing should not crash, but it should go into software though since R300 doesn't have this flag. The R420 and R520 series should support it though. For R300 PsychoLns's trick is the best option.
11-07-2005, 04:18 PM
@Humus: I've sent you the bug report for gl_BackColor over the email. If you find Shader Designer repro. form suitable I could try to make a minimal gl_FrontFace sw. mode crash repro?
CC here for peer review: :cool:
Shader Designer simple repro case:
hw & drivers:
Club3D ATI 9600XT
ATI Catalyst 5.11 BETA (http://downloads.guru3d.com/download.php?det=1243)
ATI Catalyst 5.10
step by step repro:
1. download shader designer from http://www.typhoonlabs.com/index.php?action=shaderdesigner.htm
2. install it
3. run it
4. unpack the attachment & open shader project "gl_BackColor bug on ATI 3.gdp"
5. in Project -> Textures dialog:
* increase no of T.I. to units to 1
* click on "..." next to the FileName: and select Tunnel_Boden_RE.tga
* click Accept
6. you should see the normal output
7. click on "gl_BackColor bug on ATI 3.vert" tab
8. uncomment gl_BackColor = vec4(0.5,0.5,0.5,1.0); line
9. press F4 to recompile
10. object in the upper left preview window becomes black?!?
(NOTE: as a reference, I've also tried this on NVIDIA hw., it is an
ATI specific glitch)
11-08-2005, 04:50 AM
This bug turned out to already be fixed and should appear in a future driver.
11-08-2005, 07:36 AM
I do hope you meant to say "disappear" ;)
Thanks for looking into it.
11-08-2005, 06:00 PM
Oops, yes. :) I meant to say the fix should appear in a future driver.
11-08-2005, 09:17 PM
Thanks for looking into it. :]
11-08-2005, 09:20 PM
Using gl_FrontFacing should not crash, but it should go into software though since R300 doesn't have this flag. The R420 and R520 series should support it though. For R300 PsychoLns's trick is the best option. I've checked it out, R300 indeed falls back into the software mode, but then crashes the process. As I can't reproduce the crash in Shader Designer, the culprit seems to be some specific init sequence of my code.
Hmm, is there a way to record the OpenGL state machine changes so you can replay it and trigger the bug (all VBO & no textures required)? If not, I'll perhaps send you the compiled exe or make a minimal .sln project which triggers the bug. Naturally it's of looow priority, as it is a software mode bug.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.