Remix.run Logo
mattbee 16 hours ago

My initiation into shaders was porting some graphics code from OpenGL on Windows to PS5 and Xbox, and (for your NDA and devkit fees) they give you some very nice debuggers on both platforms.

But yes, when you're stumbling around a black screen, tooling is everything. Porting bits of shader code between syntaxes is the easy bit.

Can you get better tooling on Windows if you stick to DirectX rather than OpenGL?

pjmlp 7 hours ago | parent | next [-]

Yes, Pix.

https://devblogs.microsoft.com/pix/

This is yet another problem with Khronos APIs, expecting each vendor comes up with a debugger, some do, some don't.

At least nowadays there is RenderDoc.

On the Web after a decade, it is still pixel debugging, or trying to reproduce the bug on a native APIs, because why bother with such devtools.

slightlygrilled an hour ago | parent [-]

On web there is SpectorJS https://spector.babylonjs.com/

Which offers the basics, but at least works across devices, you can also trigger the traces from code and save the output, then load in the extension. Very useful for debugging mobile.

You can just about run chrome through Nvidias Nsight (of course you're not debugging webgl, but the what ever its translated to on the platform), although I recently tired again and it seems to fail...

these where the command line args i got nsight to pass chrome to make it work

" --disable-gpu-sandbox --disable-gpu-watchdog --enable-dawn-features=emit_hlsl_debug_symbols,disable_symbol_renaming --no-sandbox --disable-direct-composition --use-angle=vulkan <URL> "

but yeah really really wish the tooling was better, especially on performance tracing, currently it's just disable and enable things and guess...

pjmlp an hour ago | parent [-]

SpectorJS is kind of abandoned nowadays, it hardly has changed and doesn't support WebGPU.

Running the whole browser rendering stack is a masochist exercise, I rather re-code the algorithm in native code, or go back into pixel debugging.

I would vouch the state of bad tooling, and how browsers blacklist users systems, is a big reason studios rather try out streaming instead of rendering on the browser.

mitchellh 15 hours ago | parent | prev [-]

> Can you get better tooling on Windows if you stick to DirectX rather than OpenGL?

My app doesn't currently support Windows. My plane was to use the full DirectX suite when I get there and go straight to D3D and friends. I lack experience at all on Windows so I'd love if someone who knows both macOS and Windows could compare GPU debugging!

speps 14 hours ago | parent [-]

Windows has PIX for Windows, PIX is the name of the GPU debugging since Xbox 360. The Windows version is similar but it relies on debug layers that need to be GPU specific which is usually handled automatically. Although because of that it’s not as deep as the console version but it lets you get by. Most people use RenderDoc on supported platforms though (Linux and Windows). It supports most APIs you can find on these platforms.

pjmlp 7 hours ago | parent [-]

Pix predates the XBox.