From edbc0c35691a0e8d41066b46f2f1ec7fdcb4896b Mon Sep 17 00:00:00 2001 From: Akihiko Odaki Date: Wed, 12 Jan 2022 12:28:33 +0900 Subject: [PATCH] vrend: Return EINVAL when switching context failed This aligns the behavior of vrend_renderer_transfer_internal with vrend_decode_ctx_submit_cmd. Signed-off-by: Akihiko Odaki --- .gitlab-ci/expectations/virt/piglit-virgl-gles-fails.txt | 6 ------ src/vrend_renderer.c | 3 ++- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci/expectations/virt/piglit-virgl-gles-fails.txt b/.gitlab-ci/expectations/virt/piglit-virgl-gles-fails.txt index ec6b1e4..c9f9260 100644 --- a/.gitlab-ci/expectations/virt/piglit-virgl-gles-fails.txt +++ b/.gitlab-ci/expectations/virt/piglit-virgl-gles-fails.txt @@ -348,12 +348,6 @@ spec@arb_shader_image_load_store@host-mem-barrier@Pixel/RaW/full barrier test/64 spec@arb_shader_image_load_store@host-mem-barrier@Pixel/RaW/one bit barrier test/16x16,Fail spec@arb_shader_image_load_store@host-mem-barrier@Pixel/RaW/one bit barrier test/4x4,Fail spec@arb_shader_image_load_store@host-mem-barrier@Pixel/RaW/one bit barrier test/64x64,Fail -spec@arb_shader_image_load_store@host-mem-barrier@Pixel/WaW/full barrier test/16x16,Fail -spec@arb_shader_image_load_store@host-mem-barrier@Pixel/WaW/full barrier test/4x4,Fail -spec@arb_shader_image_load_store@host-mem-barrier@Pixel/WaW/full barrier test/64x64,Fail -spec@arb_shader_image_load_store@host-mem-barrier@Pixel/WaW/one bit barrier test/16x16,Fail -spec@arb_shader_image_load_store@host-mem-barrier@Pixel/WaW/one bit barrier test/4x4,Fail -spec@arb_shader_image_load_store@host-mem-barrier@Pixel/WaW/one bit barrier test/64x64,Fail spec@arb_shader_image_load_store@host-mem-barrier@Texture fetch/RaW/full barrier test/16x16,Fail spec@arb_shader_image_load_store@host-mem-barrier@Texture fetch/RaW/full barrier test/4x4,Fail spec@arb_shader_image_load_store@host-mem-barrier@Texture fetch/RaW/full barrier test/64x64,Fail diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index bcabdff..10b3191 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -8440,7 +8440,8 @@ static int vrend_renderer_transfer_internal(struct vrend_context *ctx, if (!info->box) return EINVAL; - vrend_hw_switch_context(ctx, true); + if (!vrend_hw_switch_context(ctx, true)) + return EINVAL; assert(check_transfer_iovec(res, info)); if (info->iovec && info->iovec_cnt) {