Shader model (desktop or mobile) wasn't really accounted for
in the UI. This means that we will get shaders that look like
duplicates (same variant). In this work, we pass the current
shader model from engine into the frontend and filter out
variants of a different shader model.
Moreover, for matinfo, we use a specific dbg shader model (matinfo)
to indicate it is in that mode. We add UI in matinfo to show the
shadermodel.
So UI updates as well.
- The set of active variants were not set correctly for surface
materials since the frag/vert pairs could have different
variant.
- Fix the default selection logic in the UI
- Random clean-ups
FIXES=328699979
1. changes weren't refreshed for windows/linux-mesa vulkan. This
is due to a reordering of the shaders when the shader source
is replaced. We fix this by ensuring the ordering before
writing out the edit.
Fixes#7286
2. A condition was flipped in the SourceFormatter causing the
format feature to not work on linux
3. The material update status wasn't really propagated to the
front-end due to not updating the status counter.
We use clang-format to format the shader files. Since we assume
clang is necessary for compilation, installing clang-format should
not be too much of an overhead in terms of adding dependency.
Currently, we only support posix systems (macOS, linux).
- Ensure that waiting on lock times out so that we don't lock
up a thread when the client is gone.
- Add an experimental folder to matdbg/web/ for the new
UI work.
- Use a hanging-GET approach to reduce dependency on websockets.
- Also add mutex to protect access to MaterialRecords, which is
written to/read from from multiple threads.
The websocket code for parsing the EDIT command is pretty verbose.
Proposing that we move to a HTTP POST request instead.
Also moved the API handler code out of DebugServer.h for clarity.