Corion / app-shadertoy

Native shader viewer like https://www.shadertoy.com
Artistic License 2.0
17 stars 2 forks source link

Doesn't work Linux on Intel i915 with v3.0 Mesa 10.1.3 #4

Closed dk closed 7 years ago

dk commented 7 years ago

Is this critical it can't work on 3.0?

perl -Mblib scripts/shadertoy.pl shaders/seascape.fragment Initialized using GLEW 2.0.0 3.0 Mesa 10.1.3 You have an old version of OpenGL loaded (3.0), you won't have much fun. at blib/lib/OpenGL/Shader/OpenGL4.pm line 54, <> line 1. Something went wrong, looking at log at blib/lib/OpenGL/Shader/OpenGL4.pm line 146, <> line 1. Created VAO: 1281 at scripts/shadertoy.pl line 160, <> line 1. Use of uninitialized value in subroutine entry at scripts/shadertoy.pl line 172, <> line 1. Couldn't get shader attribute 'pos'. Likely your OpenGL version is below 3.3, or there is a compilation error in the shader programs? at scripts/shadertoy.pl line 174, <> line 1. [1] 14666 exit 11 perl -Mblib scripts/shadertoy.pl shaders/seascape.fragment

dk commented 7 years ago

glxinfo says: OpenGL vendor string: Intel Open Source Technology Center OpenGL renderer string: Mesa DRI Intel(R) Sandybridge Desktop OpenGL core profile version string: 3.1 (Core Profile) Mesa 10.1.3 OpenGL core profile shading language version string: 1.40

devel-chm commented 7 years ago

The current shadertoy uses OpenGL 4.x. For cygwin, I had to enable special driver support. I also saw the announcement at http://news.softpedia.com/news/mesa-13-0-0-3d-graphics-library-adds-opengl-4-5-capability-radeon-vulkan-driver-509883.shtml about a new Mesa release supporting 4.x. Maybe there is an updated driver for your linux. Maybe this new Mesa is what you need. I read somewhere that Intel does their OpenGL drivers by working with the Mesa developers.

dk commented 7 years ago

Yes, I know that it uses v4.0 - but I also see that the demos from shadertoy.com work (relatively) ok on my card. Googling brings me that there are no Intel drivers for 4.0, so I ( knowing nothing about OpenGL v4 v v3 ) wonder what can be compromised here to make it at least marginally work on my version.

Corion commented 7 years ago

Hmm - I think it is something with the shaders or the header I'm prepending in front of the fragment shader. Getting to compatibility with OpenGL 3.3 should be possible I think.

On the other hand, OpenGL 4 was released in 2010, so maybe Intel should up their game ;-)

devel-chm commented 7 years ago

It would be nice if things "just worked" especially if there is no real reason for not working. Is it because of the required version of the GLSL that make OpenGL 4.x needed?

Corion commented 7 years ago

I've now added some code that outputs the compiler errors during shader compilation. That should tell us what (your version of) OpenGL 3.3 doesn't like and what I have to fix for that :)

dk commented 7 years ago

Thank you! Is that committed here or ..?

Corion commented 7 years ago

Hello Dmitry,

Am 09.11.2016 um 22:10 schrieb Dmitry Karasik:

Thank you! Is that committed here or ..?

I forgot to commit it!!

Now pushed as

da6bf27c956860a7cc38939a56a40d9df4459f0e

-max

dk commented 7 years ago

thank you, will check in 2 days, when I get to that linux desktop with intel -- meanwhile, i'm hit again by the syntax error on 5.18.2 even after upgrading to Filter::signatures:

$ perl -c lib/OpenGL/ScreenCapture.pm Global symbol "%options" requires explicit package name at lib/OpenGL/ScreenCapture.pm line 44.

$ perl -MFilter::signatures -le 'print $Filter::signatures::VERSION' 0.06

I don't understand how did it work before, am going to investigate that, but I can't get it to work now :(

dk commented 7 years ago

perl -Mblib scripts/shadertoy.pl
Use of uninitialized value $filename in concatenation (.) or string at scripts/shadertoy.pl line 292. Initialized using GLEW 2.0.0 3.0 Mesa 10.1.3 Use of uninitialized value $filename in substitution (s///) at scripts/shadertoy.pl line 80. Use of uninitialized value $filename in concatenation (.) or string at scripts/shadertoy.pl line 81. No shader program given, using default fragment shader You have an old version of OpenGL loaded (3.0), you won't have much fun. at /nfs/home/dmka/src/app-shadertoy/blib/lib/OpenGL/Shader/OpenGL4.pm line 54. Something went wrong, looking at log at /nfs/home/dmka/src/app-shadertoy/blib/lib/OpenGL/Shader/OpenGL4.pm line 146. Error in Shader: Unable to link shader at scripts/shadertoy.pl line 144. Created VAO: 1281 at scripts/shadertoy.pl line 165. Use of uninitialized value in subroutine entry at scripts/shadertoy.pl line 177. Couldn't get shader attribute 'pos'. Likely your OpenGL version is below 3.3, or there is a compilation error in the shader programs? at scripts/shadertoy.pl line 179.

devel-chm commented 7 years ago

I get the following failure from cygwin64/win7 using the Mesa GLX OpenGL:

perl -Mblib scripts/shadertoy.pl shaders/foggy-mountain.fragment

Application built with libpng-1.6.20 but running with 1.6.24 Initialized using GLEW 2.0.0 3.0 Mesa 12.0.2 You have an old version of OpenGL loaded (3.0), you won't have much fun. at /cygdrive/c/Perl/git/app-shadertoy/blib/lib/OpenGL/Shader/OpenGL4.pm line 54, <> line 1. LLVM ERROR: Program used external function '___chkstk_ms' which could not be resolved!

It would be nice if there were examples the would run on OpenGL 3.0 as shaders were around then---maybe not quite as fancy...

On Fri, Nov 11, 2016 at 3:28 AM, Dmitry Karasik notifications@github.com wrote:

perl -Mblib scripts/shadertoy.pl

Use of uninitialized value $filename in concatenation (.) or string at scripts/shadertoy.pl line 292. Initialized using GLEW 2.0.0 3.0 Mesa 10.1.3 Use of uninitialized value $filename in substitution (s///) at scripts/ shadertoy.pl line 80. Use of uninitialized value $filename in concatenation (.) or string at scripts/shadertoy.pl line 81. No shader program given, using default fragment shader You have an old version of OpenGL loaded (3.0), you won't have much fun. at /nfs/home/dmka/src/app-shadertoy/blib/lib/OpenGL/Shader/OpenGL4.pm line 54. Something went wrong, looking at log at /nfs/home/dmka/src/app- shadertoy/blib/lib/OpenGL/Shader/OpenGL4.pm line 146. Error in Shader: Unable to link shader at scripts/shadertoy.pl line 144. Created VAO: 1281 at scripts/shadertoy.pl line 165. Use of uninitialized value in subroutine entry at scripts/shadertoy.pl line 177. Couldn't get shader attribute 'pos'. Likely your OpenGL version is below 3.3, or there is a compilation error in the shader programs? at scripts/ shadertoy.pl line 179.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Corion/app-shadertoy/issues/4#issuecomment-259906432, or mute the thread https://github.com/notifications/unsubscribe-auth/AAwNeaA-qPz0lo3n3nmKEXgyT7vflJs5ks5q9CcRgaJpZM4KsKcm .

dk commented 7 years ago

fixed by pointing to .so files from Mesa v11 that emulate OpenGL v1.4