pouët.net

Incredible long shader compilation time (HLSL)

category: general [glöplog]
plz:

glBegin(GL_INTRO);
glSeed1i(0x43874834);
glCoolness1i(4292967295);
glColorHint(GL_COLOR_HINT_REDDISH);
glGeometryHint(GL_GEOMETRY_HINT_SPHERES | GL_GEOMETRY_HINT_CUBES | GL_GEOMETRY_HINT_PLANES);
glEnd();
added on the 2009-10-08 12:11:31 by xTr1m xTr1m
plz:

D3DXGenerateMusic(0x58736946, D3DXSTYLE_DUBSTEP_WITH_A_DASS_OF_DRUM_AND_BASS, 214, D3DXKEY_CSHARP_MINOR);
added on the 2009-10-08 12:16:34 by Rob Rob
*D3DXSTYLE_DUBSTEP_WITH_A_DASH_OF_DRUM_AND_BASS

Next time I will copy/paste it directly from the SDK! ;)
added on the 2009-10-08 12:17:08 by Rob Rob
if (time >= 60.0f) glImpressAudience();
added on the 2009-10-08 12:21:41 by xTr1m xTr1m
I also started writing my own raymarcher and lately I got the same long compile time using fxc from Directx SDK august 2009. I found out that this problem occurs only using august sdk. So going back to March 2009 sdk helped in my case so no need to use d3dx_31.dll :)
added on the 2009-10-12 13:13:59 by dys129 dys129
Hmm... The March 2009 had the same problem for me.
added on the 2009-10-12 13:16:24 by Rob Rob
Any breakthroughs on this for long shaders? compile times of a minute are quite unbearable for development (and more or less a deal breaker for compos).
it's with the cs_5_0 profile, and it seems D3D10_SHADER_SKIP_OPTIMIZATION only slows things down, and [loop] hints doesn't change a thing (important loops are all dynamic though).

The Burj Babil shader (tracing pass) takes <10s in opengl (and around 1fps), but a straight cs5 port is 55s / 2.7fps at default settings (producing a slightly wrong picture) - and 190s / 8fps(!) WITH skip_optimization and correct picture... (800x600, PII-965, HD5770)
added on the 2010-10-13 00:46:58 by Psycho Psycho
Well, my 2cents, but I know that I had long compilation with D3DX while using plain texture sampling (like tex2D or Sample on D3D10)... The compilation is trying to evaluate correctly the ddx/ddy, so it's probably trying to test-run the shader on the cpu to evaluate the values... I had to revert to tex2Dlod or SampleLevel to avoid long time compilation...
added on the 2010-10-13 01:39:05 by xoofx xoofx
That's because it won't allow LOD calculation within flow control - meaning you can only use plain sampling in unrolled loops (so your loops will be unrolled if you don't specify level).
added on the 2010-10-14 14:48:04 by Psycho Psycho
Quote:
That's because it won't allow LOD calculation within flow control - meaning you can only use plain sampling in unrolled loops (so your loops will be unrolled if you don't specify level).

Indeed I was aware of that ;) So you mean that you are not doing any regular texture sampling in your loops (or no texture sampling at all), but you are still experiencing long compilation? Weird...
added on the 2010-10-16 12:37:59 by xoofx xoofx
How does that work?
added on the 2010-10-16 12:43:18 by xernobyl xernobyl
xTr1m, any reason why you feel you have to wait a whole minute before impressing the audience? ;)
added on the 2010-10-16 18:45:48 by ferris ferris
Quote:
any reason why you feel you have to wait a whole minute before impressing the audience? ;)

I often find myself wondering about that very thing when watching 4k intros :)
added on the 2010-10-17 09:51:51 by ryg ryg
you two have no sense of tension :P
added on the 2010-10-17 13:04:04 by Gargaj Gargaj
Haha, the next demo with a long loading time should have a drum roll loop playing while loading.
Agreed XD
added on the 2010-10-17 18:33:30 by ferris ferris
Well, even the drum roll loop will be unrolled!!!
added on the 2010-10-17 19:49:39 by QUINTIX QUINTIX
Well, I meant the running time of the intro. I guess 60 seconds is a good time. Take lunaquatic, the "impress audience" factor is when the cube starts to vectorslime ;) Everything before that was just a preparation for that one moment.
added on the 2010-10-18 14:27:03 by xTr1m xTr1m
I was kidding, but thanks for the plug :D
added on the 2010-10-18 15:25:19 by ferris ferris
Quote:
the "impress audience" factor is when the cube starts to vectorslime


I can't help but state that it sounds like you're describing an early 90s PC demo :) Then again, apart from the resolution and fancy lighting, in a way things are back on that level again for some of those raymarching intros out there :-)
added on the 2010-10-18 15:29:08 by superplek superplek

login