matdbg: fix three bugs (#8430)

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.
This commit is contained in:
Powei Feng
2025-02-10 23:50:45 -08:00
committed by GitHub
parent 9f5001d347
commit 1a5f1cc6ab
4 changed files with 40 additions and 6 deletions

View File

@@ -34,7 +34,7 @@ std::string SourceFormatter::format(char const* source) {
while (fgets(output, 1024, fp) != NULL) {}
int status = pclose(fp);
if (!fp || !WEXITSTATUS(status)) {
if (!fp || WEXITSTATUS(status)) {
std::call_once(mClangWarningFlag, []() {
utils::slog.w << "[matdbg] unable to run clang-format to format shader file. "
<< "Please make sure it's installed." << utils::io::endl;