[Mesa-dev] [v2 7/9] i965/blorp: Use for tex_image_2d
Topi Pohjolainen
topi.pohjolainen at gmail.com
Mon Feb 27 19:02:23 UTC 2017
Performance differences on SKL:
OglTexFilterTri: -5.59714% +/- 0.22248%
This is because the driver now starts to use lossless compression
for RGBA_UNORM mipmapped textures of level zero size 256x256. Bench
uploads data for 8 textures of this size and samples them all
in fragment shader. Upload itself doens't bring any delay,
performance is restored if one simply forces the textures to be
resolved before using them - even the resolve and sync after
doesn't matter. There are first 8 (number of textures) times 8
(number of levels in each texture) = 64 uploads, followed by
numerous sampling rounds.
OglDrvShComp: 1.59058% +/- 0.239194%
OglMultithread: 3.07351% +/- 0.283737%
Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
CC: Jason Ekstrand <jason at jlekstrand.net>
---
src/mesa/drivers/dri/i965/intel_tex_image.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/intel_tex_image.c b/src/mesa/drivers/dri/i965/intel_tex_image.c
index cff831b..cde5d2d 100644
--- a/src/mesa/drivers/dri/i965/intel_tex_image.c
+++ b/src/mesa/drivers/dri/i965/intel_tex_image.c
@@ -125,6 +125,7 @@ intelTexImage(struct gl_context * ctx,
GLenum format, GLenum type, const void *pixels,
const struct gl_pixelstore_attrib *unpack)
{
+ struct brw_context *brw = brw_context(ctx);
struct intel_texture_image *intelImage = intel_texture_image(texImage);
bool ok;
@@ -147,6 +148,13 @@ intelTexImage(struct gl_context * ctx,
if (intelImage->mt->format == MESA_FORMAT_S_UINT8)
intelImage->mt->r8stencil_needs_update = true;
+ if (brw->gen >= 6 &&
+ intel_texsubimage_gpu_copy(brw, dims, texImage, 0, 0, 0,
+ texImage->Width, texImage->Height,
+ texImage->Depth,
+ format, type, pixels, unpack))
+ return;
+
ok = _mesa_meta_pbo_TexSubImage(ctx, dims, texImage, 0, 0, 0,
texImage->Width, texImage->Height,
texImage->Depth,
--
2.9.3
More information about the mesa-dev
mailing list