From 929548f47809864f02c72784a09fd70175eca359 Mon Sep 17 00:00:00 2001 From: baldurk Date: Thu, 23 Oct 2025 18:17:41 +0100 Subject: [PATCH] Add dummy reads to pipes for linux for some reason --- util/test/demos/test_common.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/util/test/demos/test_common.cpp b/util/test/demos/test_common.cpp index 1fa800f4f..31516d5e4 100644 --- a/util/test/demos/test_common.cpp +++ b/util/test/demos/test_common.cpp @@ -297,6 +297,12 @@ bool SpvCompilationSupported() if(!pipe) continue; + char dummy[512]; + while(!feof(pipe)) + { + fread(dummy, 1, 512, pipe); + } + int code = pclose(pipe); if(WEXITSTATUS(code) == 0) @@ -516,6 +522,12 @@ std::vector CompileShaderToSpv(const std::string &source_text, SPIRVTa return ret; } + char dummy[512]; + while(!feof(pipe)) + { + fread(dummy, 1, 512, pipe); + } + pclose(pipe); f = fopen(outfile.c_str(), "rb");