GLSL Ati's shortcomings

ehart said:
On windowsXP, you can get caught by the watchdog timer if you try to run huge shaders with loops like this. The shader will run so long, that the OS will eventually think that graphics system hung. In reality, it was just executing one command you gave it.
There's a way to disable the watchdog if you really want to run such programs. I don't have a link to the directions now, but the info is someplace on Microsoft's site.
 
mhouston said:
http://msdn.microsoft.com/library/d..._afd545a0-e561-414a-9c8c-cc049907c0e3.xml.asp

Be careful with this. With ATI boards, it's possible to pretty much infinite loop the board. The dynamic instruction limit is something ridiculous. The tweak above has allowed us to increase the watchdog so that we can run multi-minute single pass shaders on our boards.

I computed that a PS could be written that would run >30 days or so, on a single pixel. Something like 2^51 cycles.
 
sireric said:
For fun ;-)

Or for some marketing mine-is-bigger-than-yours thing. I actually forgot. I just remember the number, because it's cool.

"Ours would run in only 18 days!" doesn't strike me as a marketing battle-cry tho. . . :p
 
geo said:
"Ours would run in only 18 days!" doesn't strike me as a marketing battle-cry tho. . . :p

Ok, I think it was our developer relations guys wondering if a developer could hang the chip with a valid shader. Yes, it can. Well, unless you have a lot of time on your hands ;-)

All I remember is sitting with one of my designers and working it out. Within a binary order of magnitude, we got it about right.
 
Not to kick a dead horse, but I for one would be grateful if Nvidia would adhere to the letter of the spec with a little added ebullience. If there's something wrong with the spec, then fix the spec - don't go off half cocked and do something the rest of us are going to have to pay for. (Case and point: the trouble with uniform tribbles.) :LOL:
 
Cozmo said:
If there's something wrong with the spec, then fix the spec - don't go off half cocked and do something the rest of us are going to have to pay for. (Case and point: the trouble with uniform tribbles.)
Rub it in why don't you? :)

Anyway, you may want to have a look at your opengl.org thread.
 
Look at what I found that doesn't cause RenderMonkey to not go into software mode. :LOL:

Code:
uniform sampler2D renderTex;


float loop(inout float val);

void main(void)
{
   vec4 color = texture2D(renderTex, gl_TexCoord[0].st);
   
   for(int i=0; i < 4; i++)
   {
      color.x = loop(color.x);
   }
   
   gl_FragColor = color;
}

float loop(inout float val){
   for(int i=0; i < 5; i++){
      val += val;
   }
   return val;
}
 
That's probably because, from a cursory glance at that code, the shader is just multiplying the first component of "color" by 1048576 (2^20). No HW loop instructions are needed, only a free constant.
 
Apperently not as this runs in software.

Code:
uniform sampler2D renderTex;


void main(void)
{
   vec4 color = texture2D(renderTex, gl_TexCoord[0].st);
   
   for(int i=0; i < 4; i++)
   {
      for(int j=0; j < 5; j++){
         color.x *= color.x;
      }
      
   }
   
   gl_FragColor = color;
}
 
That's what I was complaining about to begin with.
Ati's compiler has a few more issues like this which is plainly ANNOYING.
 
Back
Top