Geometry Shader crash

Problems building or running the engine, queries about how to use features etc.
Post Reply
Shem
Halfling
Posts: 55
Joined: Fri Feb 16, 2018 9:32 am
x 8

Geometry Shader crash

Post by Shem »

Ogre Version: 1.12.9
Operating System: Win10
Render System: OGL3+
Quadro RTX 4000

Hi,

Using the default PassthroughGP.glsl (#version 150) crashes my app. If I remove that shader from my material everything works fine.
For this test I'm not passing any params between shaders so I can keep the PassthroughGP shader as is. There are no shader compilation issues as far as I can tell.

Any help I can get will be most welcome
Thanks in advance
Shem
Shem
Halfling
Posts: 55
Joined: Fri Feb 16, 2018 9:32 am
x 8

Re: Geometry Shader crash

Post by Shem »

I've compared the log files with and without the geometric shader and there are no differences.
Shem
Halfling
Posts: 55
Joined: Fri Feb 16, 2018 9:32 am
x 8

Re: Geometry Shader crash

Post by Shem »

hasCapability(RSC_GEOMETRY_PROGRAM) passed
Shem
Halfling
Posts: 55
Joined: Fri Feb 16, 2018 9:32 am
x 8

Re: Geometry Shader crash

Post by Shem »

Geometry shader sample in SampleBrowser works fine
Shem
Halfling
Posts: 55
Joined: Fri Feb 16, 2018 9:32 am
x 8

Re: Geometry Shader crash

Post by Shem »

OK, so the silent crash is due mesh creation using OT_LINE_LIST.
I've obviously missed something so now to find out what.
Shem
Halfling
Posts: 55
Joined: Fri Feb 16, 2018 9:32 am
x 8

Re: Geometry Shader crash

Post by Shem »

This was helpful:
viewtopic.php?t=94617

But for now I just created a different material for the line renderables with a GS using layout(lines) and while I'm still not seeing what I think I should be seeing, at least there's no more silent crash.
Shem
Halfling
Posts: 55
Joined: Fri Feb 16, 2018 9:32 am
x 8

Re: Geometry Shader crash

Post by Shem »

So...While the app doesn't crash anymore, any renderable using the new material doesn't have any supported techniques which is bad.
The only difference between the material that has supported techniques and the one that doesn't is the addition of the passthrough geometry shader.
The investigation continues...
Shem
Halfling
Posts: 55
Joined: Fri Feb 16, 2018 9:32 am
x 8

Re: Geometry Shader crash

Post by Shem »

OK. Turns out I'm an idiot. One often is in hindsight. I had assumed that since the mesh creation was done using OT_LINE_LIST the layout output would be line_list which isn't a valid output_primitive for the GS. Once I changed it to line_strip everything worked as expected.

https://www.khronos.org/opengl/wiki/Geometry_Shader

Hope this helps someone
And thank you Pavel for that heart - made me feel I wasn't talking to myself
Now to actually do something useful with that GS
Post Reply