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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user