From 78d22d29fd129603e51f1d845636d3d1b01b0c8d Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Tue, 5 Mar 2019 09:59:26 +0100 Subject: [PATCH] vrend,blit: Fix the use of glCopyTexSubImage On one hand render_condition_enable might also be set when the cond_render_gl_mode is empty, so no conditional rendering is actually done and the copy path can be used. On the other hand, on GLES rectangular textures are emulated, so the texture target needs to be corrected, and for some reason different base formats were required which doesn't make sense. Signed-off-by: Gert Wollny Reviewed-by: Gurchetan Singh --- src/vrend_renderer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index 4215a2b..ccfaeda 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -7888,12 +7888,12 @@ void vrend_renderer_blit(struct vrend_context *ctx, * to resource_copy_region, in this case and if no render states etx need * to be applied, forward the call to glCopyImageSubData, otherwise do a * normal blit. */ - if (has_feature(feat_copy_image) && !info->render_condition_enable && - (src_res->base.format != dst_res->base.format) && + if (has_feature(feat_copy_image) && + (!info->render_condition_enable || !ctx->sub->cond_render_gl_mode) && format_is_copy_compatible(info->src.format,info->dst.format, false) && !info->scissor_enable && (info->filter == PIPE_TEX_FILTER_NEAREST) && !info->alpha_blend && (info->mask == PIPE_MASK_RGBA) && - (src_res->base.nr_samples == dst_res->base.nr_samples) && + src_res->base.nr_samples == dst_res->base.nr_samples && info->src.box.width == info->dst.box.width && info->src.box.height == info->dst.box.height && info->src.box.depth == info->dst.box.depth) {