Open kotvkvante opened 11 months ago
Related: https://github.com/Immediate-Mode-UI/Nuklear/issues/190 - sounds like the same or similar case.
I am no expert on OpenGL so I would need to spend some more time educating myself about the details. Currently I am out of time, but perhaps someone more knowledgeable will chime in :wink:.
Probably a driver issue, doing the same on Linux (6.4.6) with an Nvidia card (RTX 2080), the program runs without any issue.
With Nvidia, there is nvidia-settings
which gives detailed information about the device :
Isn't there a similar tool with AMD?
@riri glxinfo
shows the GLX settings for AMD. GLX_ARB...
and other functions are there. Although, I have the same problem as mentioned above.
I'm getting these errors:
-> [ glfw_opengl4 ] :: make
rm -f bin/demo
cc main.c -std=c89 -Wall -Wextra -pedantic -O2 -o bin/demo -lglfw -lGL -lm -lGLU -lGLEW
In file included from main.c:66:
../../demo/common/overview.c: In function ‘overview’:
../../demo/common/overview.c:15:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
15 | static nk_bool disable_widgets = nk_false;
| ^~~~~~
-> [ glfw_opengl4 ] :: cd bin
-> [ bin ] :: ls
demo*
-> [ bin ] :: ./demo
[GL]: failed to compile shader: 0:2(12): error: extension `GL_ARB_bindless_texture' unsupported in vertex shader
[GL]: failed to compile shader: 0:2(12): error: extension `GL_ARB_bindless_texture' unsupported in fragment shader
demo: nuklear_glfw_gl4.h:179: nk_glfw3_device_create: Assertion `status == GL_TRUE' failed.
zsh: IOT instruction (core dumped) ./demo
-> [ bin ] ::
Getting the same error, Manjaro Linux, GLFW 3.3, and glxinfo
shows:
...
Extended renderer info (GLX_MESA_query_renderer):
Vendor: Intel (0x8086)
Device: Mesa Intel(R) HD Graphics 4400 (HSW GT2) (0xa16)
Version: 23.3.3
Accelerated: yes
...
I've added -g
to CFLAGS
, this is my output:
$ make
rm -f bin/demo
cc main.c -std=c89 -Wall -Wextra -pedantic -O2 -g -o bin/demo -lglfw -lGL -lm -lGLU -lGLEW
In file included from main.c:66:
../../demo/common/overview.c: In function ‘overview’:
../../demo/common/overview.c:15:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
15 | static nk_bool disable_widgets = nk_false;
| ^~~~~~
$ ./bin/demo
[GL]: failed to compile shader: 0:2(12): error: extension `GL_ARB_bindless_texture' unsupported in vertex shader
[GL]: failed to compile shader: 0:2(12): error: extension `GL_ARB_bindless_texture' unsupported in fragment shader
demo: nuklear_glfw_gl4.h:179: nk_glfw3_device_create: Assertion `status == GL_TRUE' failed.
Aborted (core dumped)
$ gdb ./bin/demo core.97291
GNU gdb (GDB) 13.2
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./bin/demo...
warning: Can't open file anon_inode:i915.gem which was expanded to anon_inode:i915.gem during file-backed mapping note processing
warning: Can't open file anon_inode:i915.gem which was expanded to anon_inode:i915.gem during file-backed mapping note processing
warning: Can't open file anon_inode:i915.gem which was expanded to anon_inode:i915.gem during file-backed mapping note processing
warning: Can't open file anon_inode:i915.gem which was expanded to anon_inode:i915.gem during file-backed mapping note processing
warning: Can't open file /memfd:xshmfence (deleted) during file-backed mapping note processing
warning: Can't open file anon_inode:i915.gem which was expanded to anon_inode:i915.gem during file-backed mapping note processing
warning: Can't open file anon_inode:i915.gem which was expanded to anon_inode:i915.gem during file-backed mapping note processing
warning: Can't open file anon_inode:i915.gem which was expanded to anon_inode:i915.gem during file-backed mapping note processing
warning: Can't open file anon_inode:i915.gem which was expanded to anon_inode:i915.gem during file-backed mapping note processing
warning: Can't open file anon_inode:i915.gem which was expanded to anon_inode:i915.gem during file-backed mapping note processing
warning: Can't open file anon_inode:i915.gem which was expanded to anon_inode:i915.gem during file-backed mapping note processing
warning: Can't open file anon_inode:i915.gem which was expanded to anon_inode:i915.gem during file-backed mapping note processing
warning: Can't open file anon_inode:i915.gem which was expanded to anon_inode:i915.gem during file-backed mapping note processing
warning: Can't open file anon_inode:i915.gem which was expanded to anon_inode:i915.gem during file-backed mapping note processing
warning: Can't open file anon_inode:i915.gem which was expanded to anon_inode:i915.gem during file-backed mapping note processing
warning: Can't open file anon_inode:i915.gem which was expanded to anon_inode:i915.gem during file-backed mapping note processing
warning: Can't open file anon_inode:i915.gem which was expanded to anon_inode:i915.gem during file-backed mapping note processing
[New LWP 97291]
[New LWP 97293]
[New LWP 97292]
This GDB supports auto-downloading debuginfo from the following URLs:
<https://debuginfod.archlinux.org>
Enable debuginfod for this session? (y or [n]) n
Debuginfod has been disabled.
To make this setting permanent, add 'set debuginfod enabled off' to .gdbinit.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `./bin/demo'.
Program terminated with signal SIGABRT, Aborted.
#0 0x00007f3e0c90483c in ?? () from /usr/lib/libc.so.6
[Current thread is 1 (Thread 0x7f3e0c32b740 (LWP 97291))]
(gdb) bt
#0 0x00007f3e0c90483c in ?? () from /usr/lib/libc.so.6
#1 0x00007f3e0c8b4668 in raise () from /usr/lib/libc.so.6
#2 0x00007f3e0c89c4b8 in abort () from /usr/lib/libc.so.6
#3 0x00007f3e0c89c3dc in ?? () from /usr/lib/libc.so.6
#4 0x00007f3e0c8acd26 in __assert_fail () from /usr/lib/libc.so.6
#5 0x000055d7ba37fbfe in nk_glfw3_device_create () at /home/peki/Code/Nuklear/demo/glfw_opengl4/nuklear_glfw_gl4.h:179
#6 0x000055d7ba38053a in nk_glfw3_init (win=<optimized out>, init_state=init_state@entry=NK_GLFW3_INSTALL_CALLBACKS,
max_vertex_buffer=max_vertex_buffer@entry=524288, max_element_buffer=max_element_buffer@entry=131072)
at /home/peki/Code/Nuklear/demo/glfw_opengl4/nuklear_glfw_gl4.h:537
#7 0x000055d7ba33851a in main () at main.c:113
(gdb) quit
Also experiencing this issue on Artix Linux, GLFW 3.4-2, Radeon Vega 64.
This fixed it for me: https://github.com/Immediate-Mode-UI/Nuklear/issues/190#issuecomment-909293525
1) I'm trying to run glfw3 opengl4 demo example.
Everything compiles fine.
but then:
I see a black window and then it closes. 2) OpenGL 3, OpenGL 2 and Sdl examples works fine.
3) I'm trying to use gdb to find out where program fails:
Output:
I think this is because of GL_ARB_bindless_texture functionality. Without this option example works fine. Does this bug occurs because of my amd drivers?
I can't find list of supported opengl functions for my drivers..