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
x 2

How to debug glsl shader on linux?

Post 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?
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5296
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1278
Contact:

Re: How to debug glsl shader on linux?

Post 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.
ppd
Gnoblar
Posts: 8
Joined: Thu Nov 22, 2012 12:04 pm
x 2

Re: How to debug glsl shader on linux?

Post 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.
peanutandchestnut
Kobold
Posts: 36
Joined: Tue Nov 11, 2014 9:29 am
x 2

Re: How to debug glsl shader on linux?

Post 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啊!!!!!
peanutandchestnut
Kobold
Posts: 36
Joined: Tue Nov 11, 2014 9:29 am
x 2

Re: How to debug glsl shader on linux?

Post 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.
Post Reply