cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

cippyboy
Journeyman III

GL Shader compiler crash

So, even after a year of reporting that my Instance Tesselation shader is crashing on AMD hardware, it's still not fixed, so this time I arranged a binary that can reproduce the crash. Actually on 14.9 drivers it's a crash only because my app doesn't handle some states, but the log clearly states something like this :

Program link log:


Vertex shader(s) failed to link, fragment shader(s) failed to link.


Vertex link error: INVALID_OPERATION.


unexpected error.


fragment link error: INVALID_OPERATION.


unexpected error.


The shaders ( Water.vert & Water.frag ) compile ok btw. So here it is, just press "Start Benchmark" and it will crash. You can deselect Instanced Tesselation and it will not crash.

0 Likes
3 Replies
davychen
Adept I

hi cippyboy,

i've checked your shader source,

there is no GLSL version declaration in Water.* shaders.

you used in / out variables in your shaders,

if you don't declare GLSL version, default version would be #version 110,

in / out variables are not supported by version 110, so there will be compiling errors.

i added

#version 440 compatibility

to first line of following shaders:

Water.vert

Water.frag

Water.tcs

Water.tes

then the cash can't be observed.

can you check again?

regards

davy

0 Likes

That answer tells me you haven't run the app in any profiler since in code I manually add #version 420 core

If you were to check the Log.txt and go to Water.vert you'd see it would then say :

ERROR: 0:5: error(#105) #version must occur before any other program statement

ERROR: error(#273) 1 compilation errors.  No code generated

The crash doesn't occur anymore because the shader clearly fails compilation so the object doesn't get rendered at all...

Still crashes though as of 14.12

0 Likes

hi cippyboy,

we are able to reproduce your issue,

fix will be delivered in future catalyst release.

if you need a temporary work aroud,

please rewrite:

VertexData Vertex[ 3 ] = { Vertices[ FetchedIndices[ 0 ]], Vertices[ FetchedIndices[ 1 ]], Vertices[ FetchedIndices[ 2 ]] };

into:

        VertexData Vertex[ 3 ];

        for (int i = 0; i < 3; i++)

        {

            Vertex = Vertices[ FetchedIndices[ i ]];

        }

thank you for reporting this issue.

regards

davy