diff options
author | Jason Ekstrand <[email protected]> | 2017-05-31 10:06:31 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-06-07 22:18:53 -0700 |
commit | 0607ca42da5fdb79b64445e34c642925e94354de (patch) | |
tree | 8c187dcda2f4c9eea0729ac08888a6417911f99c /src/mesa/drivers/dri/i965/intel_tex_image.c | |
parent | 3b65f9499c36d7b4ce7e4661299c23bc9d3816e6 (diff) |
i965: Be a bit more conservative about certain resolves
There are several places where we were resolving the entire miptree
when we really only needed to resolve a single slice. Let's avoid the
unneeded resolving.
Reviewed-by: Topi Pohjolainen <[email protected]>
Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/intel_tex_image.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_tex_image.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_tex_image.c b/src/mesa/drivers/dri/i965/intel_tex_image.c index 77e09e83a58..8cd1eae296b 100644 --- a/src/mesa/drivers/dri/i965/intel_tex_image.c +++ b/src/mesa/drivers/dri/i965/intel_tex_image.c @@ -533,10 +533,13 @@ intel_gettexsubimage_tiled_memcpy(struct gl_context *ctx, if (brw->gen < 5 && brw->has_swizzling) return false; + int level = texImage->Level + texImage->TexObject->MinLevel; + /* Since we are going to write raw data to the miptree, we need to resolve * any pending fast color clears before we start. */ - intel_miptree_all_slices_resolve_color(brw, image->mt, 0); + assert(image->mt->logical_depth0 == 1); + intel_miptree_resolve_color(brw, image->mt, level, 1, 0, 1, 0); bo = image->mt->bo; @@ -561,8 +564,6 @@ intel_gettexsubimage_tiled_memcpy(struct gl_context *ctx, packing->Alignment, packing->RowLength, packing->SkipPixels, packing->SkipRows); - int level = texImage->Level + texImage->TexObject->MinLevel; - /* Adjust x and y offset based on miplevel */ xoffset += image->mt->level[level].level_x; yoffset += image->mt->level[level].level_y; |