GLSL Shader getting corrupted

Apprentice
Posts: 5
Joined: 2008.02
Post: #1
Hi people,

Just wondering if anybody has ever seen an issue where a shader what compiled and linked correctly will randomly start producing the wrong thing.

Basically, what I've got is a GLSL vertex shader that does vertex blending, and on some systems it will produce corrupt rendering (as in vertex positions in random places completely disjoint from where they should be). The two systems it's been seen on are ATI X1600 based MacBook Pros running 10.5.3. Other Machines I've tested (GF7600, HD2600, GMA950) all work fine.

Strangely enough, if I use OpenGL Profiler to interrupt the app, and recompile the shaders, then everything pops back and runs fine for eternity (or a close approximation there of). I guess that suggests that something else I'm doing is corrupting the shader, but it's going to be difficult to find out what.

Anybody ever seen anything like this?
Quote this message in a reply
Sage
Posts: 1,199
Joined: 2004.10
Post: #2
Any chance you're sending junk vertex attributes?
Quote this message in a reply
Apprentice
Posts: 5
Joined: 2008.02
Post: #3
I guess the attributes could be binding in different locations on this hardware, and exposing a bug, but as it's intermittent in nature I wouldn't have thought so. Doesn't explain why the recompilation helps either.

Certainly something to look at though.
Quote this message in a reply
Sage
Posts: 1,199
Joined: 2004.10
Post: #4
Try to make a simple app that reproduces this behavior. If it's a bug in your code, you'll catch it quickly. If it's an Apple bug, you'll have a great demo app to submit to apple's bug reporter!
Quote this message in a reply
Apprentice
Posts: 5
Joined: 2008.02
Post: #5
I've started on the task of doing just that. Hope I can reproduce it. My gut tells me driver bug, but I've been wrong before.

I was just hoping that somebody may have hit the same thing. Never mind!
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  ios/mac shader - shared glsl source OptimisticMonkey 2 5,342 Jun 17, 2011 08:59 AM
Last Post: OptimisticMonkey
  passing values from vertex to fragment shader Sumaleth 6 11,182 Feb 18, 2011 01:54 AM
Last Post: Holmes
  Changing Uniform Variables for a Single Shader reapz 3 5,615 Jul 15, 2010 01:29 AM
Last Post: dazza
  Vertex shader particle billboarding question TomorrowPlusX 3 5,742 Sep 15, 2008 06:46 AM
Last Post: TomorrowPlusX
  Per-pixel shader? kelvin 15 8,711 Mar 9, 2008 07:42 PM
Last Post: kelvin