…and print error in such case. Which probably is not a rare event btw
because fopen doesn't expand ~ to $HOME.
Also get rid of unused "bool ret" variable.
Signed-off-by: Constantine Kharlamov <Hi-Angel@yandex.ru>
Signed-off-by: Dave Airlie <airlied@redhat.com>
ctx->b.num_gfx_cs_flushes++;
if (ctx->is_debug) {
- bool ret = ws->fence_wait(ws, ctx->b.last_gfx_fence, 10000000);
- if (ret == false) {
+ if (!ws->fence_wait(ws, ctx->b.last_gfx_fence, 10000000)) {
const char *fname = getenv("R600_TRACE");
if (!fname)
exit(-1);
FILE *fl = fopen(fname, "w+");
- if (fl)
+ if (fl) {
eg_dump_debug_state(&ctx->b.b, fl, 0);
- fclose(fl);
+ fclose(fl);
+ } else
+ perror(fname);
exit(-1);
}
}