vtest: Handle errors coming out of virgl_renderer_submit_cmd

Previously, Mesa would remain forever blocked in read() after an error
such as failing to compile a shader.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
macos/master
Tomeu Vizoso 5 years ago committed by Tomeu Vizoso
parent 8056fe3565
commit 70b18e56d5
  1. 4
      vtest/vtest_renderer.c

@ -681,10 +681,10 @@ int vtest_submit_cmd(uint32_t length_dw)
return -1;
}
virgl_renderer_submit_cmd(cbuf, ctx->ctx_id, length_dw);
ret = virgl_renderer_submit_cmd(cbuf, ctx->ctx_id, length_dw);
free(cbuf);
return 0;
return ret ? -1 : 0;
}
#define DECODE_TRANSFER \

Loading…
Cancel
Save