# Pastebin SC2vgVkU $ git diff diff --git a/src/gallium/drivers/v3d/v3d_resource.c b/src/gallium/drivers/v3d/v3d_resource.c index 96dfcddf69d..b9931ce141e 100644 --- a/src/gallium/drivers/v3d/v3d_resource.c +++ b/src/gallium/drivers/v3d/v3d_resource.c @@ -431,8 +431,7 @@ v3d_resource_get_handle(struct pipe_screen *pscreen, case WINSYS_HANDLE_TYPE_SHARED: return v3d_bo_flink(bo, &whandle->handle); case WINSYS_HANDLE_TYPE_KMS: - if (screen->ro) { - assert(rsc->scanout); + if (screen->ro && rsc->scanout) { bool ok = renderonly_get_handle(rsc->scanout, whandle); whandle->stride = rsc->slices[0].stride; return ok; @@ -807,7 +806,6 @@ v3d_resource_create_with_modifiers(struct pipe_screen *pscreen, if (!rsc->scanout) { fprintf(stderr, "Failed to create scanout resource\n"); - goto fail; } assert(handle.type == WINSYS_HANDLE_TYPE_FD); rsc->bo = v3d_bo_open_dmabuf(screen, handle.handle); @@ -930,7 +928,6 @@ v3d_resource_from_handle(struct pipe_screen *pscreen, NULL); if (!rsc->scanout) { fprintf(stderr, "Failed to create scanout resource.\n"); - goto fail; } } diff --git a/src/gallium/drivers/vc4/vc4_resource.c b/src/gallium/drivers/vc4/vc4_resource.c index 8ecfb9507e6..5f335b0e16b 100644 --- a/src/gallium/drivers/vc4/vc4_resource.c +++ b/src/gallium/drivers/vc4/vc4_resource.c @@ -319,8 +319,7 @@ vc4_resource_get_handle(struct pipe_screen *pscreen, return vc4_bo_flink(rsc->bo, &whandle->handle); case WINSYS_HANDLE_TYPE_KMS: - if (screen->ro) { - assert(rsc->scanout); + if (screen->ro && rsc->scanout) { return renderonly_get_handle(rsc->scanout, whandle); } whandle->handle = rsc->bo->handle; @@ -572,8 +571,6 @@ vc4_resource_create_with_modifiers(struct pipe_screen *pscreen, !(count == 1 && modifiers[0] == DRM_FORMAT_MOD_INVALID))) { rsc->scanout = renderonly_scanout_for_resource(prsc, screen->ro, NULL); - if (!rsc->scanout) - goto fail; } vc4_bo_label(screen, rsc->bo, "%sresource %dx%d@%d/%d", @@ -689,8 +686,6 @@ vc4_resource_from_handle(struct pipe_screen *pscreen, renderonly_create_gpu_import_for_resource(prsc, screen->ro, NULL); - if (!rsc->scanout) - goto fail; } if (rsc->tiled && whandle->stride != slice->stride) {