Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP4:GA
virglrenderer
0016-24f67de-vrend-check-info-formats-in-blits....
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0016-24f67de-vrend-check-info-formats-in-blits.patch of Package virglrenderer
commit 24f67de7a9088a873844a39be03cee6882260ac9 Author: Gert Wollny <gert.wollny@collabora.com> Date: Mon Oct 7 10:59:56 2019 +0200 vrend: check info formats in blits Closes #141 Closes #142 v2 : drop colon in error description (Emil) Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Index: virglrenderer-0.5.0/src/virgl_hw.h =================================================================== --- virglrenderer-0.5.0.orig/src/virgl_hw.h +++ virglrenderer-0.5.0/src/virgl_hw.h @@ -270,6 +270,7 @@ enum virgl_ctx_errors { VIRGL_ERROR_CTX_ILLEGAL_SURFACE, VIRGL_ERROR_CTX_ILLEGAL_VERTEX_FORMAT, VIRGL_ERROR_CTX_ILLEGAL_CMD_BUFFER, + VIRGL_ERROR_CTX_ILLEGAL_FORMAT, }; Index: virglrenderer-0.5.0/src/vrend_renderer.c =================================================================== --- virglrenderer-0.5.0.orig/src/vrend_renderer.c +++ virglrenderer-0.5.0/src/vrend_renderer.c @@ -461,7 +461,7 @@ static inline const char *pipe_shader_to }; } -static const char *vrend_ctx_error_strings[] = { "None", "Unknown", "Illegal shader", "Illegal handle", "Illegal resource", "Illegal surface", "Illegal vertex format", "Illegal command buffer" }; +static const char *vrend_ctx_error_strings[] = { "None", "Unknown", "Illegal shader", "Illegal handle", "Illegal resource", "Illegal surface", "Illegal vertex format", "Illegal command buffer", "Illegal format ID" }; static void __report_context_error(const char *fname, struct vrend_context *ctx, enum virgl_ctx_errors error, uint32_t value) { @@ -5656,6 +5656,16 @@ void vrend_renderer_blit(struct vrend_co if (ctx->in_error) return; + if (!info->src.format || (enum virgl_formats)info->src.format >= VIRGL_FORMAT_MAX) { + report_context_error(ctx, VIRGL_ERROR_CTX_ILLEGAL_FORMAT, info->src.format); + return; + } + + if (!info->dst.format || (enum virgl_formats)info->dst.format >= VIRGL_FORMAT_MAX) { + report_context_error(ctx, VIRGL_ERROR_CTX_ILLEGAL_FORMAT, info->dst.format); + return; + } + if (info->render_condition_enable == false) vrend_pause_render_condition(ctx, true);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor