How to debug glsl shader on linux?

Get answers to all your basic programming questions. No Ogre questions, please!
Post Reply
peanutandchestnut
Kobold
Posts: 36
Joined: Tue Nov 11, 2014 9:29 am

How to debug glsl shader on linux?

Post by peanutandchestnut » Sat Nov 26, 2016 11:39 am

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?
0 x

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 3698
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 120
Contact:

Re: How to debug glsl shader on linux?

Post by dark_sylinc » Sat Nov 26, 2016 4:13 pm

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.
0 x

ppd
Gnoblar
Posts: 8
Joined: Thu Nov 22, 2012 12:04 pm

Re: How to debug glsl shader on linux?

Post by ppd » Sun Nov 27, 2016 12:36 pm

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.
0 x

peanutandchestnut
Kobold
Posts: 36
Joined: Tue Nov 11, 2014 9:29 am

Re: How to debug glsl shader on linux?

Post by peanutandchestnut » Sun Nov 27, 2016 1:12 pm

:( :( :( :( :( :( :( :( :( :( :( :( :( :( :( :( :( :( :( :( :( :( :( :( :(
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啊!!!!!
0 x

peanutandchestnut
Kobold
Posts: 36
Joined: Tue Nov 11, 2014 9:29 am

Re: How to debug glsl shader on linux?

Post by peanutandchestnut » Wed Jan 17, 2018 2:18 am

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.
0 x

Post Reply