Page 1 of 1

How to debug glsl shader on linux?

Posted: Sat Nov 26, 2016 11:39 am
by peanutandchestnut
This problem has been bugging me since the day i learn linux.
This question has been asked many times on stackoverflow, but i don't see a prefect answer.

The only tool i'm using now is apitrace, i can see all the draw calls and uniform values with apitrace, but that's not enough.
I know you can check variable by chang fragment output color, but it's quite quite inefficient, just like a blind guy groping with a stick.
I want to debug glsl shader line by line, just like nsight in visualstudio.

If there has no such tool on linux, how do you guys live with glsl on linux?

Re: How to debug glsl shader on linux?

Posted: Sat Nov 26, 2016 4:13 pm
by dark_sylinc
peanutandchestnut wrote:If there has no such tool on linux, how do you guys live with glsl on linux?
The answer is: I dual boot to Windows.

RenderDoc has a server capture of OpenGL for Linux (which I haven't tried), but the client that analyzes the capture still has to be run in Windows.

Re: How to debug glsl shader on linux?

Posted: Sun Nov 27, 2016 12:36 pm
by ppd
dark_sylinc wrote:
peanutandchestnut wrote:If there has no such tool on linux, how do you guys live with glsl on linux?
The answer is: I dual boot to Windows.

RenderDoc has a server capture of OpenGL for Linux (which I haven't tried), but the client that analyzes the capture still has to be run in Windows.
RenderDoc has QT5 client. It builds with minor hitches, capture works, replay less so (frequent crashes). But as for now it has no glsl shader debugger.

Re: How to debug glsl shader on linux?

Posted: Sun Nov 27, 2016 1:12 pm
by peanutandchestnut
:( :( :( :( :( :( :( :( :( :( :( :( :( :( :( :( :( :( :( :( :( :( :( :( :(
Looks like nsight in visual studio(not in eclipse) is the only tool that can be used to debug glsl line by line.
I really really don't like this!!!!
:( :( :( :( :( :( :( :( :( :( :( :( :( :( :( :( :( :( :( :( :( :( :( :( :(
人生不如意十之89啊!!!!!

Re: How to debug glsl shader on linux?

Posted: Wed Jan 17, 2018 2:18 am
by peanutandchestnut
There still has no tool to debug glsl line by line on linux.
I'm using following tools on linux right now:
  • apitrace : a very handy tool, support all versions of opengl.
  • linux grahics debugger : only support openg4.2+, and you need a nvidia video card. I use this one when i failed to debug in apitrace.
  • renderdoc : only support opengl3.2+, crushes from time to time, i'm watching this one, as glsl shader debugger is in it's todo list.