OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

Compiling vertext shader fails on Intel


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
loopy
User


Joined: 11 Mar 2009
Posts: 84

PostPosted: Fri Dec 14, 2018 7:28 pm    Post subject:
Compiling vertext shader fails on Intel
Reply with quote

Hi,
I am using a vertex shader to do some hardware instancing and on Intel graphics drivers I am getting the error ( after I set OSG_NOTIFY_LEVEL=DEBUG).
Everything works great on nVidia.

OpenGL Information:
OpenGL Version: 4.2.0 - Build 10.18.10.3574
Vendor: Intel
Renderer: Intel(R) HD Graphics 4600


Compiling VERTEX source:
1: #version 110
2: //varying vec3 N;
3: //varying vec3 v;
4: attribute vec3 d;
5: void main()
6: {
7: vec3 pos = vec3(gl_Vertex) + d;
8: vec4 finalPos = vec4(pos, 1.0);
9: vec3 v = vec3(gl_ModelViewMatrix * finalPos);
10: vec3 N = normalize(gl_NormalMatrix * gl_Normal);
11: vec4 Iamb = gl_FrontLightProduct[0].ambient;
12: vec3 L = normalize(gl_LightSource[0].position.xyz - v);
13: vec4 Idiff = gl_FrontLightProduct[0].diffuse * abs(dot(N,L));
14: Idiff = clamp(Idiff, 0.0, 1.0);
15: vec4 Iamb2 = gl_FrontLightProduct[1].ambient;
16: vec3 L2 = normalize(gl_LightSource[1].position.xyz - v);
17: vec4 Idiff2 = gl_FrontLightProduct[1].diffuse * abs(dot(N,L2));
18: Idiff2 = clamp(Idiff2, 0.0, 1.0);
19: gl_FrontColor = Idiff+Iamb+Idiff2+Iamb2;
20: gl_BackColor = Idiff+Iamb+Idiff2+Iamb2;
21: gl_Position = gl_ModelViewProjectionMatrix * finalPos;
22: gl_ClipVertex = gl_ModelViewMatrix * finalPos;
23: }


Linking osg::Program "" id=2 contextID=0

Program's vertex attrib binding 1, d


glLinkProgram "" FAILED


OpenGL extension '' is not supported.


I gather this might be something to do with gl_ClipVertex but it's not clear what I can do.

Thanks
Andrew
Back to top
View user's profile Send private message
Chris Hanson
Guest





PostPosted: Fri Dec 14, 2018 8:56 pm    Post subject:
Compiling vertext shader fails on Intel
Reply with quote

That driver release dates from at least 2015 from what I can see. Isn't there anything newer available, before you go stressing about it?

On Fri, Dec 14, 2018 at 8:29 PM Andrew Cunningham < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:

Quote:
Hi,
I am using a vertex shader to do some hardware instancing and on Intel graphics drivers I am getting the error ( after I set OSG_NOTIFY_LEVEL=DEBUG).
Everything works great on nVidia.

OpenGL Information:
OpenGL Version: 4.2.0 - Build 10.18.10.3574
Vendor: Intel
Renderer: Intel(R) HD Graphics 4600


Compiling VERTEX source:
    1: #version 110
    2: //varying vec3 N;
    3: //varying vec3 v;
    4: attribute vec3 d;
    5: void main()
    6: {
    7: vec3 pos = vec3(gl_Vertex) + d;
    8: vec4 finalPos = vec4(pos, 1.0);
    9: vec3 v = vec3(gl_ModelViewMatrix * finalPos);
   10: vec3 N = normalize(gl_NormalMatrix * gl_Normal);
   11: vec4 Iamb = gl_FrontLightProduct[0].ambient;
   12: vec3 L = normalize(gl_LightSource[0].position.xyz - v);
   13: vec4 Idiff = gl_FrontLightProduct[0].diffuse * abs(dot(N,L));
   14: Idiff = clamp(Idiff, 0.0, 1.0);
   15: vec4 Iamb2 = gl_FrontLightProduct[1].ambient;
   16: vec3 L2 = normalize(gl_LightSource[1].position.xyz - v);
   17: vec4 Idiff2 = gl_FrontLightProduct[1].diffuse * abs(dot(N,L2));
   18: Idiff2 = clamp(Idiff2, 0.0, 1.0);
   19: gl_FrontColor =  Idiff+Iamb+Idiff2+Iamb2;
   20: gl_BackColor =  Idiff+Iamb+Idiff2+Iamb2;
   21: gl_Position = gl_ModelViewProjectionMatrix * finalPos;
   22:  gl_ClipVertex = gl_ModelViewMatrix * finalPos;
   23: }


Linking osg::Program "" id=2 contextID=0

Program's vertex attrib binding 1, d


glLinkProgram "" FAILED


OpenGL extension '' is not supported.


I gather this might be something to do with  gl_ClipVertex but it's not clear what I can do.

Thanks
Andrew

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75307#75307





_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



--
Chris 'Xenon' Hanson, omo sanza lettere. http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Legal/IP • Forensics • Imaging • UAVs • GIS • GPS • osgEarth • Terrain • Telemetry • Cryptography • LIDAR • Embedded • Mobile • iPhone/iPad/iOS • Android
@alphapixel facebook.com/alphapixel (775) 623-PIXL [7495]

------------------
Post generated by Mail2Forum
Back to top
loopy
User


Joined: 11 Mar 2009
Posts: 84

PostPosted: Fri Dec 14, 2018 9:21 pm    Post subject:
Reply with quote

Sadly although the driver is old, apparently it can't be updated to a newer version on this DELL laptop.

Also, I am struggling a bit to detect/recover from the failure of
"glLinkProgram".

It appears this is delayed until the "first render" using the shader.
Back to top
View user's profile Send private message
Chris Hanson
Guest





PostPosted: Fri Dec 14, 2018 10:12 pm    Post subject:
Compiling vertext shader fails on Intel
Reply with quote

I think compiling the shader is deferred until it's actually needed.

The fact that it doesn't list WHAT extension it needs suggests to me that the driver is just broken and there may not be anything you can do.


You could try a validator and see if it flags anything wrong with your GLSL code: https://github.com/KhronosGroup/glslang



On Fri, Dec 14, 2018 at 10:21 PM Andrew Cunningham < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:

Quote:
Sadly although the driver is old, apparently it can't be updated to a newer version on this DELL laptop.

Also, I am struggling a bit to detect/recover from the failure of
"glLinkProgram".

It appears this is delayed until the "first render" using the shader.

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75310#75310





_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



--
Chris 'Xenon' Hanson, omo sanza lettere. http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Legal/IP • Forensics • Imaging • UAVs • GIS • GPS • osgEarth • Terrain • Telemetry • Cryptography • LIDAR • Embedded • Mobile • iPhone/iPad/iOS • Android
@alphapixel facebook.com/alphapixel (775) 623-PIXL [7495]

------------------
Post generated by Mail2Forum
Back to top
loopy
User


Joined: 11 Mar 2009
Posts: 84

PostPosted: Sat Dec 15, 2018 1:56 am    Post subject:
Reply with quote

Hi Chris,
I managed to work around the issue by falling back to a slower rendering system. Also it turns out the laptop has a switchable graphics subsystem to nVidia ( which works perfectly) or Intel, so there are two workarounds.

I'll check out that validator.

Thanks

Andrew
Back to top
View user's profile Send private message
Chris Hanson
Guest





PostPosted: Sat Dec 15, 2018 9:41 pm    Post subject:
Compiling vertext shader fails on Intel
Reply with quote

There are some tricks you can use to trigger the Nvidia/Intel autoswitching to force it to run on the NVidia chipset, even if you don't set it up in the NVidia control panel.

On Sat, Dec 15, 2018 at 3:56 AM Andrew Cunningham < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:

Quote:
Hi Chris,
I managed to work around the issue by falling back to a slower rendering system. Also it turns out the laptop has a switchable graphics subsystem to nVidia ( which works perfectly) or Intel, so there are two workarounds.

I'll check out that validator.

Thanks

Andrew

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75312#75312





_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



--
Chris 'Xenon' Hanson, omo sanza lettere. http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Legal/IP • Forensics • Imaging • UAVs • GIS • GPS • osgEarth • Terrain • Telemetry • Cryptography • LIDAR • Embedded • Mobile • iPhone/iPad/iOS • Android
@alphapixel facebook.com/alphapixel (775) 623-PIXL [7495]

------------------
Post generated by Mail2Forum
Back to top
cbuchner1
Appreciator


Joined: 14 Mar 2012
Posts: 316

PostPosted: Tue Dec 18, 2018 4:45 pm    Post subject:
Compiling vertext shader fails on Intel
Reply with quote

To debug this further, the nvidia driver supports

Quote:
#pragma optionNV(strict on)
in the shader where it might indicate what could possibly be wrong with the code  (this is assuming that there is something wrong in the shader code).



Christian






Am Sa., 15. Dez. 2018 um 22:41 Uhr schrieb Chris Hanson < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)>:

Quote:
There are some tricks you can use to trigger the Nvidia/Intel autoswitching to force it to run on the NVidia chipset, even if you don't set it up in the NVidia control panel.

On Sat, Dec 15, 2018 at 3:56 AM Andrew Cunningham < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:

Quote:
Hi Chris,
I managed to work around the issue by falling back to a slower rendering system. Also it turns out the laptop has a switchable graphics subsystem to nVidia ( which works perfectly) or Intel, so there are two workarounds.

I'll check out that validator.

Thanks

Andrew

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75312#75312





_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



--
Chris 'Xenon' Hanson, omo sanza lettere. http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Legal/IP • Forensics • Imaging • UAVs • GIS • GPS • osgEarth • Terrain • Telemetry • Cryptography • LIDAR • Embedded • Mobile • iPhone/iPad/iOS • Android
@alphapixel facebook.com/alphapixel (775) 623-PIXL [7495]






_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Chris Hanson
Guest





PostPosted: Tue Dec 18, 2018 5:53 pm    Post subject:
Compiling vertext shader fails on Intel
Reply with quote

Good suggestion!

On Tue, Dec 18, 2018 at 6:45 PM Christian Buchner < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:

Quote:
To debug this further, the nvidia driver supports

Quote:
#pragma optionNV(strict on)
in the shader where it might indicate what could possibly be wrong with the code  (this is assuming that there is something wrong in the shader code).



Christian






Am Sa., 15. Dez. 2018 um 22:41 Uhr schrieb Chris Hanson < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)>:

Quote:
There are some tricks you can use to trigger the Nvidia/Intel autoswitching to force it to run on the NVidia chipset, even if you don't set it up in the NVidia control panel.

On Sat, Dec 15, 2018 at 3:56 AM Andrew Cunningham < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:

Quote:
Hi Chris,
I managed to work around the issue by falling back to a slower rendering system. Also it turns out the laptop has a switchable graphics subsystem to nVidia ( which works perfectly) or Intel, so there are two workarounds.

I'll check out that validator.

Thanks

Andrew

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75312#75312





_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



--
Chris 'Xenon' Hanson, omo sanza lettere. http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Legal/IP • Forensics • Imaging • UAVs • GIS • GPS • osgEarth • Terrain • Telemetry • Cryptography • LIDAR • Embedded • Mobile • iPhone/iPad/iOS • Android
@alphapixel facebook.com/alphapixel (775) 623-PIXL [7495]






_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



--
Chris 'Xenon' Hanson, omo sanza lettere. http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Legal/IP • Forensics • Imaging • UAVs • GIS • GPS • osgEarth • Terrain • Telemetry • Cryptography • LIDAR • Embedded • Mobile • iPhone/iPad/iOS • Android
@alphapixel facebook.com/alphapixel (775) 623-PIXL [7495]

------------------
Post generated by Mail2Forum
Back to top
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts Layered rendering with a geometry shader AnyOldName3 General 8 Tue May 14, 2019 11:25 pm View latest post
No new posts Write Image From texture Generated by... GarfieldPig General 1 Wed May 08, 2019 11:42 am View latest post
No new posts override the texture with the gl_frag... GarfieldPig General 1 Sun Apr 14, 2019 8:31 am View latest post
No new posts CPU Performance issues with AMD 2700 ... robertosfield General 10 Mon Apr 01, 2019 2:01 pm View latest post
No new posts culling / bounding calculation for sh... christoph General 3 Thu Mar 28, 2019 1:17 pm View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP