From 80fc3896f343c0ddc24e76abc9b0161f75511f3c Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Fri, 11 May 2018 11:19:06 -0700 Subject: [PATCH] i965: Delete the blitter path for CopyTexSubImage The blorp path (called first) can do anything the blitter path can do so it's just dead code. Reviewed-by: Topi Pohjolainen Reviewed-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/intel_tex_copy.c | 58 ---------------------- 1 file changed, 58 deletions(-) diff --git a/src/mesa/drivers/dri/i965/intel_tex_copy.c b/src/mesa/drivers/dri/i965/intel_tex_copy.c index 5a0e09f2551..bc209c605bd 100644 --- a/src/mesa/drivers/dri/i965/intel_tex_copy.c +++ b/src/mesa/drivers/dri/i965/intel_tex_copy.c @@ -37,61 +37,11 @@ #include "intel_mipmap_tree.h" #include "intel_fbo.h" #include "intel_tex.h" -#include "intel_blit.h" #include "brw_context.h" #define FILE_DEBUG_FLAG DEBUG_TEXTURE -static bool -intel_copy_texsubimage(struct brw_context *brw, - struct intel_texture_image *intelImage, - GLint dstx, GLint dsty, GLint slice, - struct intel_renderbuffer *irb, - GLint x, GLint y, GLsizei width, GLsizei height) -{ - const GLenum internalFormat = intelImage->base.Base.InternalFormat; - - if (!intelImage->mt || !irb || !irb->mt) { - if (unlikely(INTEL_DEBUG & DEBUG_PERF)) - fprintf(stderr, "%s fail %p %p (0x%08x)\n", - __func__, intelImage->mt, irb, internalFormat); - return false; - } - - /* No pixel transfer operations (zoom, bias, mapping), just a blit */ - if (brw->ctx._ImageTransferState) - return false; - - intel_prepare_render(brw); - - /* glCopyTexSubImage() can be called on a multisampled renderbuffer (if - * that renderbuffer is associated with the window system framebuffer), - * however the hardware blitter can't handle this case, so fall back to - * meta (which can, since it uses ReadPixels). - */ - if (irb->Base.Base.NumSamples != 0) - return false; - - /* glCopyTexSubImage() can't be called on a multisampled texture. */ - assert(intelImage->base.Base.NumSamples == 0); - - /* account for view parameters and face index */ - int dst_level = intelImage->base.Base.Level + - intelImage->base.Base.TexObject->MinLevel; - int dst_slice = slice + intelImage->base.Base.Face + - intelImage->base.Base.TexObject->MinLayer; - - /* blit from src buffer to texture */ - return intel_miptree_blit(brw, - irb->mt, irb->mt_level, irb->mt_layer, - x, y, irb->Base.Base.Name == 0, - intelImage->mt, dst_level, dst_slice, - dstx, dsty, false, - width, height, COLOR_LOGICOP_COPY); -} - - static void intelCopyTexSubImage(struct gl_context *ctx, GLuint dims, struct gl_texture_image *texImage, @@ -107,14 +57,6 @@ intelCopyTexSubImage(struct gl_context *ctx, GLuint dims, xoffset, yoffset, width, height)) return; - /* Next, try the BLT engine. */ - if (intel_copy_texsubimage(brw, - intel_texture_image(texImage), - xoffset, yoffset, slice, - intel_renderbuffer(rb), x, y, width, height)) { - return; - } - /* Finally, fall back to meta. This will likely be slow. */ perf_debug("%s - fallback to swrast\n", __func__); _mesa_meta_CopyTexSubImage(ctx, dims, texImage, -- 2.30.2