[Mesa-dev] [PATCH V2 20/22] i965/gen9: Use blitter as fallback path to read YF/YS surfaces
Anuj Phogat
anuj.phogat at gmail.com
Fri Apr 17 16:51:41 PDT 2015
Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
---
src/mesa/drivers/dri/i965/intel_pixel_read.c | 10 +---------
src/mesa/drivers/dri/i965/intel_tex_image.c | 7 -------
2 files changed, 1 insertion(+), 16 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/intel_pixel_read.c b/src/mesa/drivers/dri/i965/intel_pixel_read.c
index a7eefb3..7411092 100644
--- a/src/mesa/drivers/dri/i965/intel_pixel_read.c
+++ b/src/mesa/drivers/dri/i965/intel_pixel_read.c
@@ -222,7 +222,6 @@ intelReadPixels(struct gl_context * ctx,
struct brw_context *brw = brw_context(ctx);
bool dirty;
bool create_pbo = false;
- uint32_t tr_mode = INTEL_MIPTREE_TRMODE_NONE;
DBG("%s\n", __FUNCTION__);
@@ -231,10 +230,8 @@ intelReadPixels(struct gl_context * ctx,
&ctx->ReadBuffer->Attachment[ctx->ReadBuffer->_ColorReadBufferIndex];
struct intel_renderbuffer *irb =
intel_renderbuffer(readAtt->Renderbuffer);
- if (irb && irb->mt) {
- tr_mode = irb->mt->tr_mode;
+ if (irb && irb->mt)
create_pbo = irb->mt->tr_mode != INTEL_MIPTREE_TRMODE_NONE;
- }
}
if (_mesa_meta_pbo_GetTexSubImage(ctx, 2, NULL, x, y, 0, width,
@@ -243,11 +240,6 @@ intelReadPixels(struct gl_context * ctx,
pack))
return;
- /* Currently there are no fallback paths to read data from surfaces with
- * tr_mode != INTEL_MIPTREE_TRMODE_NONE.
- */
- assert(tr_mode == INTEL_MIPTREE_TRMODE_NONE);
-
if (_mesa_is_bufferobj(ctx->Pack.BufferObj))
perf_debug("%s: fallback to CPU mapping in PBO case\n", __FUNCTION__);
diff --git a/src/mesa/drivers/dri/i965/intel_tex_image.c b/src/mesa/drivers/dri/i965/intel_tex_image.c
index 00ccbe0..838e07a 100644
--- a/src/mesa/drivers/dri/i965/intel_tex_image.c
+++ b/src/mesa/drivers/dri/i965/intel_tex_image.c
@@ -491,13 +491,11 @@ intel_get_tex_image(struct gl_context *ctx,
struct brw_context *brw = brw_context(ctx);
bool ok;
bool create_pbo = false;
- uint32_t tr_mode = INTEL_MIPTREE_TRMODE_NONE;
DBG("%s\n", __FUNCTION__);
if (brw->gen >= 9) {
struct intel_texture_image *intelImage = intel_texture_image(texImage);
- tr_mode = intelImage->mt->tr_mode;
create_pbo = intelImage->mt->tr_mode != INTEL_MIPTREE_TRMODE_NONE;
}
@@ -508,11 +506,6 @@ intel_get_tex_image(struct gl_context *ctx,
false /*for_readpixels*/, &ctx->Pack))
return;
- /* Currently there are no fallback paths to read data from surfaces with
- * tr_mode != INTEL_MIPTREE_TRMODE_NONE.
- */
- assert(tr_mode == INTEL_MIPTREE_TRMODE_NONE);
-
if (_mesa_is_bufferobj(ctx->Pack.BufferObj))
perf_debug("%s: fallback to CPU mapping in PBO case\n", __FUNCTION__);
--
2.3.4
More information about the mesa-dev
mailing list