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 <gert.wollny@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
macos/master
Gert Wollny 6 years ago
parent 596e794616
commit 78d22d29fd
  1. 6
      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) {

Loading…
Cancel
Save