static void intelCopyTexSubImage(struct gl_context *ctx, GLuint dims, struct gl_texture_image *texImage, GLint xoffset, GLint yoffset, GLint slice, struct gl_renderbuffer *rb, GLint x, GLint y, GLsizei width, GLsizei height) { struct brw_context *brw = brw_context(ctx); /* Try BLORP first. It can handle almost everything. */ if (brw_blorp_copytexsubimage(brw, rb, texImage, slice, x, y, 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, xoffset, yoffset, slice, rb, x, y, width, height); }
static void intelCopyTexSubImage(struct gl_context *ctx, GLuint dims, struct gl_texture_image *texImage, GLint xoffset, GLint yoffset, GLint zoffset, struct gl_renderbuffer *rb, GLint x, GLint y, GLsizei width, GLsizei height) { struct intel_context *intel = intel_context(ctx); if (dims != 3) { #ifndef I915 /* Try BLORP first. It can handle almost everything. */ if (brw_blorp_copytexsubimage(intel, rb, texImage, x, y, xoffset, yoffset, width, height)) return; #endif /* Next, try the BLT engine. */ if (intel_copy_texsubimage(intel, intel_texture_image(texImage), xoffset, yoffset, intel_renderbuffer(rb), x, y, width, height)) return; } /* Finally, fall back to meta. This will likely be slow. */ fallback_debug("%s - fallback to swrast\n", __FUNCTION__); _mesa_meta_CopyTexSubImage(ctx, dims, texImage, xoffset, yoffset, zoffset, rb, x, y, width, height); }