Revert "vrend: Check GL errors"

This reverts commit 8d452da883.
macos/master
Akihiko Odaki 3 years ago committed by Nikita Tokarchuk
parent 96a8334cdd
commit c8b112f5f5
Signed by: mainnika
GPG Key ID: A595FB7E3E56911C
  1. 6
      .gitlab-ci/expectations/host/piglit-virgl-gles-fails.txt
  2. 1
      .gitlab-ci/expectations/virt/piglit-virgl-gles-fails.txt
  3. 7
      src/vrend_decode.c
  4. 21
      src/vrend_renderer.c
  5. 2
      src/vrend_renderer.h
  6. 2
      tests/test_virgl_transfer.c

@ -3327,12 +3327,12 @@ spec@!opengl 1.4@gl-1.4-tex1d-2dborder,Fail
spec@!opengl 1.4@tex-miplevel-selection-lod-bias,Fail spec@!opengl 1.4@tex-miplevel-selection-lod-bias,Fail
spec@!opengl 1.5@depth-tex-compare,Fail spec@!opengl 1.5@depth-tex-compare,Fail
spec@!opengl 1.5@draw-elements-user,Fail spec@!opengl 1.5@draw-elements-user,Fail
spec@!opengl 1.5@draw-vertices,Crash spec@!opengl 1.5@draw-vertices,Fail
spec@!opengl 1.5@draw-vertices-user,Crash spec@!opengl 1.5@draw-vertices-user,Fail
spec@!opengl 2.0@gl-2.0-edgeflag,Fail spec@!opengl 2.0@gl-2.0-edgeflag,Fail
spec@!opengl 2.0@gl-2.0-edgeflag-immediate,Fail spec@!opengl 2.0@gl-2.0-edgeflag-immediate,Fail
spec@!opengl 2.0@gl-2.0-large-point-fs,Fail spec@!opengl 2.0@gl-2.0-large-point-fs,Fail
spec@!opengl 2.0@gl-2.0-vertexattribpointer,Crash spec@!opengl 2.0@gl-2.0-vertexattribpointer,Fail
spec@!opengl 2.0@occlusion-query-discard,Fail spec@!opengl 2.0@occlusion-query-discard,Fail
spec@!opengl 3.0@required-texture-attachment-formats,Fail spec@!opengl 3.0@required-texture-attachment-formats,Fail
spec@!opengl 3.0@sampler-cube-shadow,Fail spec@!opengl 3.0@sampler-cube-shadow,Fail

@ -3434,6 +3434,7 @@ spec@!opengl 1.5@draw-vertices-user,Fail
spec@!opengl 2.0@gl-2.0-edgeflag,Fail spec@!opengl 2.0@gl-2.0-edgeflag,Fail
spec@!opengl 2.0@gl-2.0-edgeflag-immediate,Fail spec@!opengl 2.0@gl-2.0-edgeflag-immediate,Fail
spec@!opengl 2.0@gl-2.0-large-point-fs,Fail spec@!opengl 2.0@gl-2.0-large-point-fs,Fail
spec@!opengl 2.0@gl-2.0-vertexattribpointer,Fail
spec@!opengl 2.0@occlusion-query-discard,Fail spec@!opengl 2.0@occlusion-query-discard,Fail
spec@!opengl 3.0@required-texture-attachment-formats,Fail spec@!opengl 3.0@required-texture-attachment-formats,Fail
spec@!opengl 3.0@sampler-cube-shadow,Fail spec@!opengl 3.0@sampler-cube-shadow,Fail

@ -1570,9 +1570,8 @@ static int vrend_decode_ctx_transfer_3d(struct virgl_context *ctx,
{ {
TRACE_FUNC(); TRACE_FUNC();
struct vrend_decode_ctx *dctx = (struct vrend_decode_ctx *)ctx; struct vrend_decode_ctx *dctx = (struct vrend_decode_ctx *)ctx;
int ret = vrend_renderer_transfer_iov(dctx->grctx, res->res_id, info, return vrend_renderer_transfer_iov(dctx->grctx, res->res_id, info,
transfer_mode); transfer_mode);
return vrend_check_no_error(dctx->grctx) || ret ? ret : EINVAL;
} }
static int vrend_decode_ctx_get_blob(struct virgl_context *ctx, static int vrend_decode_ctx_get_blob(struct virgl_context *ctx,
@ -1735,8 +1734,6 @@ static int vrend_decode_ctx_submit_cmd(struct virgl_context *ctx,
TRACE_SCOPE_SLOW(vrend_get_comand_name(cmd)); TRACE_SCOPE_SLOW(vrend_get_comand_name(cmd));
ret = decode_table[cmd](gdctx->grctx, buf, len); ret = decode_table[cmd](gdctx->grctx, buf, len);
if (!vrend_check_no_error(gdctx->grctx) && !ret)
ret = EINVAL;
if (ret) { if (ret) {
vrend_printf("context %d failed to dispatch %s: %d\n", vrend_printf("context %d failed to dispatch %s: %d\n",
gdctx->base.ctx_id, vrend_get_comand_name(cmd), ret); gdctx->base.ctx_id, vrend_get_comand_name(cmd), ret);

@ -6502,22 +6502,6 @@ static uint64_t vrend_pipe_resource_get_size(struct pipe_resource *pres,
return res->size; return res->size;
} }
bool vrend_check_no_error(struct vrend_context *ctx)
{
GLenum err;
err = glGetError();
if (err == GL_NO_ERROR)
return true;
while (err != GL_NO_ERROR) {
vrend_report_context_error(ctx, VIRGL_ERROR_CTX_UNKNOWN, err);
err = glGetError();
}
return false;
}
const struct virgl_resource_pipe_callbacks * const struct virgl_resource_pipe_callbacks *
vrend_renderer_get_pipe_callbacks(void) vrend_renderer_get_pipe_callbacks(void)
{ {
@ -6677,11 +6661,6 @@ int vrend_renderer_init(const struct vrend_if_cbs *cbs, uint32_t flags)
vrend_state.use_egl_fence = virgl_egl_supports_fences(egl); vrend_state.use_egl_fence = virgl_egl_supports_fences(egl);
#endif #endif
if (!vrend_check_no_error(vrend_state.ctx0)) {
vrend_renderer_fini();
return EINVAL;
}
return 0; return 0;
} }

@ -128,8 +128,6 @@ struct vrend_if_cbs {
#define VREND_USE_EXTERNAL_BLOB (1 << 1) #define VREND_USE_EXTERNAL_BLOB (1 << 1)
#define VREND_USE_ASYNC_FENCE_CB (1 << 2) #define VREND_USE_ASYNC_FENCE_CB (1 << 2)
bool vrend_check_no_error(struct vrend_context *ctx);
const struct virgl_resource_pipe_callbacks * const struct virgl_resource_pipe_callbacks *
vrend_renderer_get_pipe_callbacks(void); vrend_renderer_get_pipe_callbacks(void);

@ -879,7 +879,7 @@ START_TEST(virgl_test_copy_transfer_to_staging_without_iov_fails)
virgl_encoder_copy_transfer(&ctx, &dst_res, 0, 0, &box, &src_res, 0, synchronized); virgl_encoder_copy_transfer(&ctx, &dst_res, 0, 0, &box, &src_res, 0, synchronized);
ret = virgl_renderer_submit_cmd(ctx.cbuf->buf, ctx.ctx_id, ctx.cbuf->cdw); ret = virgl_renderer_submit_cmd(ctx.cbuf->buf, ctx.ctx_id, ctx.cbuf->cdw);
ck_assert_int_eq(ret, EINVAL); ck_assert_int_eq(ret, 0);
virgl_renderer_ctx_detach_resource(ctx.ctx_id, src_res.handle); virgl_renderer_ctx_detach_resource(ctx.ctx_id, src_res.handle);
virgl_renderer_ctx_detach_resource(ctx.ctx_id, dst_res.handle); virgl_renderer_ctx_detach_resource(ctx.ctx_id, dst_res.handle);

Loading…
Cancel
Save