glsl: Fixes glcpp/tests with mingw/gcc
glcpp mingw failing in the following way: ``` 49/56 mesa:compiler+glcpp / glcpp test (unix) FAIL 3.39s exit status 1 50/56 mesa:compiler+glcpp / glcpp test (oldmac) FAIL 3.41s exit status 1 51/56 mesa:compiler+glcpp / glcpp test (bizarro) FAIL 3.42s exit status 1 52/56 mesa:compiler+glcpp / glcpp test (windows) FAIL 3.45s exit status 1 ``` The test failed because on mingw, the stderr will comes after stdout, but all the expect files, the stderr is coming first, so we flush(stderr) first to makesure stderr out before stdout The failing example: 039-func-arg-obj-macro-with-comma: FAIL --- +++ @@ -1,3 +1,5 @@ +0:12(21): preprocessor error: Error: macro foo invoked with 2 arguments (expected 1) + Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Reviewed-by: Caio Oliveira <caio.oliveira@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26778>
This commit is contained in:
parent
ae54cbeb3f
commit
aa8ea0f1b9
1 changed files with 3 additions and 1 deletions
|
|
@ -174,8 +174,10 @@ main (int argc, char *argv[])
|
|||
|
||||
ret = glcpp_preprocess(ctx, &shader, &info_log, NULL, NULL, &gl_ctx);
|
||||
|
||||
printf("%s", shader);
|
||||
fprintf(stderr, "%s", info_log);
|
||||
fflush(stderr);
|
||||
printf("%s", shader);
|
||||
fflush(stdout);
|
||||
|
||||
ralloc_free(ctx);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue