Generate comments with information about the shader during optimization
Categories
(Core :: Graphics: WebRender, task, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox80 | --- | fixed |
People
(Reporter: nical, Assigned: nical)
Details
Attachments
(1 file)
The shader preprocessing used to emit a comment at the top with the name of the shader at build time, which was very handy when inspecting things in renderdoc or apitrace. It looks like the information got lost, I suspect during the shader optimization. It would be great to get that info back.
Icing on the cake would be to also show the shader feature defines.
Comment 1•6 years ago
|
||
(In reply to Nicolas Silva [:nical] from comment #0)
The shader preprocessing used to emit a comment at the top with the name of the shader at build time, which was very handy when inspecting things in renderdoc or apitrace. It looks like the information got lost, I suspect during the shader optimization. It would be great to get that info back.
Icing on the cake would be to also show the shader feature defines.
Can you just turn off shader optimization when running renderdoc/apitrace?
Comment 2•6 years ago
|
||
Here is where we write the optimized shader output to files.
I think basically we just need to
a) write the first line of the optimized shader (because GLSL requires the first line be the '#version' string)
b) write format!("// {}", full_shader_name)
c) write the rest of the optimized shader
| Assignee | ||
Comment 3•6 years ago
|
||
Can you just turn off shader optimization when running renderdoc/apitrace?
Is it something I can do on a distributed nightly build ? In any case if I can help it I'd rather not have to think about fiddling around before capturing something.
The fix looks easy enough.
Comment 4•6 years ago
|
||
Setting gfx.webrender.use-optimized-shaders=false will make us use the non-optimized shaders, which might make debugging easier. (The optimized shaders can be quite hard to follow.)
| Assignee | ||
Comment 5•6 years ago
|
||
This writes the shader name and list of featrues as a comment at the beginning of optimized shaders.
Updated•6 years ago
|
Comment 7•6 years ago
|
||
| bugherder | ||
Description
•