[Mesa-dev] [PATCH 8/9] i965/gen6+: Use for tex_subimage_2d
Topi Pohjolainen
topi.pohjolainen at gmail.com
Tue Dec 20 14:45:36 UTC 2016
Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
---
src/mesa/drivers/dri/i965/intel_tex_subimage.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/intel_tex_subimage.c b/src/mesa/drivers/dri/i965/intel_tex_subimage.c
index f999a93..741637a 100644
--- a/src/mesa/drivers/dri/i965/intel_tex_subimage.c
+++ b/src/mesa/drivers/dri/i965/intel_tex_subimage.c
@@ -393,6 +393,7 @@ intelTexSubImage(struct gl_context * ctx,
const GLvoid * pixels,
const struct gl_pixelstore_attrib *packing)
{
+ struct brw_context *brw = brw_context(ctx);
struct intel_mipmap_tree *mt = intel_texture_image(texImage)->mt;
bool ok;
@@ -407,6 +408,14 @@ intelTexSubImage(struct gl_context * ctx,
_mesa_enum_to_string(format), _mesa_enum_to_string(type),
texImage->Level, texImage->Width, texImage->Height, texImage->Depth);
+ const bool is_src_bo = _mesa_is_bufferobj(packing->BufferObj);
+ if (brw->gen >= 6 && (tex_busy || is_src_bo) &&
+ intel_texsubimage_gpu_copy(brw, dims, texImage,
+ xoffset, yoffset, zoffset,
+ width, height, depth,
+ format, type, pixels, packing))
+ return;
+
ok = _mesa_meta_pbo_TexSubImage(ctx, dims, texImage,
xoffset, yoffset, zoffset,
width, height, depth, format, type,
--
2.5.5
More information about the mesa-dev
mailing list