[Mesa-dev] [v2 8/9] i965/blorp: Use for tex_subimage_2d
Topi Pohjolainen
topi.pohjolainen at gmail.com
Mon Feb 27 19:02:24 UTC 2017
OglTerrainFlyInst: 4.3506% +/- 0.359936% (N = 14)
OglTerrainFlyTess: 3.5859% +/- 0.221177% (N = 15)
Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
---
src/mesa/drivers/dri/i965/intel_tex_subimage.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/intel_tex_subimage.c b/src/mesa/drivers/dri/i965/intel_tex_subimage.c
index 91e49bc..48a190c 100644
--- a/src/mesa/drivers/dri/i965/intel_tex_subimage.c
+++ b/src/mesa/drivers/dri/i965/intel_tex_subimage.c
@@ -397,6 +397,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;
@@ -411,6 +412,16 @@ intelTexSubImage(struct gl_context * ctx,
_mesa_enum_to_string(format), _mesa_enum_to_string(type),
texImage->Level, texImage->Width, texImage->Height, texImage->Depth);
+ /* First try direct gpu upload in case target texture is in use or the
+ * source is a buffer object.
+ */
+ if (brw->gen >= 6 &&
+ 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.9.3
More information about the mesa-dev
mailing list