Handmade Hero » Forums » Code » [Day 390] Shader Validation error Assert.
msmshazan
Shazan Shums
166 posts

Some day I will make quality software.
Programming FTW.

#12196 [Day 390] Shader Validation error Assert.
6 months ago Edited by Shazan Shums on June 13, 2017, 9:37 a.m.

I get an Assert(!"Shader validation failed") in the function OpenglCreateProgram. I know that my hardware supports glsl 1.40 . Can't seem to figure out the problem.

Just being curious on programming....
mmozeiko
Mārtiņš Možeiko
1518 posts
1 project
#12197 [Day 390] Shader Validation error Assert.
6 months ago Edited by Mārtiņš Možeiko on June 13, 2017, 5:45 p.m.

Check the error messages from shader compiler. That assert is there exactly for reason to stop in debugger. Then it's up to you to check VertexErrors, FragmentErrors and ProgramErrors strings that will contain error messages. You can see Casey doing this in videos multiple times.

AFAIK HH is using OpenGL 3.2 for shaders - GLSL source has "#version 150", so that means GLSL 1.4 (OpenGL 3.1) is not supported.
msmshazan
Shazan Shums
166 posts

Some day I will make quality software.
Programming FTW.

#12201 [Day 390] Shader Validation error Assert.
6 months ago

FragmentsErrors shows this: ERROR: 2:5: 'GL_ARB_texture_multisample' : extension is disabled
ERROR: 2:6: 'GL_ARB_texture_multisample' : extension is disabled

How to bypass this.

Just being curious on programming....
mmozeiko
Mārtiņš Možeiko
1518 posts
1 project
#12203 [Day 390] Shader Validation error Assert.
6 months ago

Does your GPU and driver supports "GL_ARB_texture_multisample" extension?
Can you try to put "#extension GL_ARB_texture_multisample : require" at beginning of fragment shader?

For which shader does it fail with this error? CompileResolveMultisample?
msmshazan
Shazan Shums
166 posts

Some day I will make quality software.
Programming FTW.

#12205 [Day 390] Shader Validation error Assert.
6 months ago Edited by Shazan Shums on June 15, 2017, 10:40 a.m.

No my driver doesn't have texture_multisample support. Does this mean handmade hero will not work on my PC or is there a fix .

Just being curious on programming....
mmozeiko
Mārtiņš Možeiko
1518 posts
1 project
#12206 [Day 390] Shader Validation error Assert.
6 months ago Edited by Mārtiņš Možeiko on June 15, 2017, 7:18 p.m.

In current state it won't run.

If you would put "#if MultisamplingDebug" / "#endif" around "uniform sampler2DM" lines then it should run as long as you keep MultisamplingDebug setting to false. I believe that's its default value currently.

You'll also probably need to change "150" to "130" in #version line when multi sample is disabled.