diff options
author | Marek Olšák <[email protected]> | 2016-10-26 18:12:07 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-11-01 22:33:13 +0100 |
commit | c66a550385b4937b2aaba8484aeaa41cf77399b7 (patch) | |
tree | b19b98f0a8a5bddb04da66fb8ea5bcb6d5c066a5 /src/gallium/drivers/radeonsi/si_blit.c | |
parent | 692f2640ab0c4c923a5ba12ff8526d2d1a3eefb1 (diff) |
gallium/radeon: don't call u_format helpers if we have that info already
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_blit.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_blit.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_blit.c b/src/gallium/drivers/radeonsi/si_blit.c index 0f46d71ddaf..fe17f739242 100644 --- a/src/gallium/drivers/radeonsi/si_blit.c +++ b/src/gallium/drivers/radeonsi/si_blit.c @@ -838,6 +838,7 @@ void si_resource_copy_region(struct pipe_context *ctx, const struct pipe_box *src_box) { struct si_context *sctx = (struct si_context *)ctx; + struct r600_texture *rsrc = (struct r600_texture*)src; struct pipe_surface *dst_view, dst_templ; struct pipe_sampler_view src_templ, *src_view; unsigned dst_width, dst_height, src_width0, src_height0; @@ -867,7 +868,7 @@ void si_resource_copy_region(struct pipe_context *ctx, if (util_format_is_compressed(src->format) || util_format_is_compressed(dst->format)) { - unsigned blocksize = util_format_get_blocksize(src->format); + unsigned blocksize = rsrc->surface.bpe; if (blocksize == 8) src_templ.format = PIPE_FORMAT_R16G16B16A16_UINT; /* 64-bit block */ @@ -909,7 +910,7 @@ void si_resource_copy_region(struct pipe_context *ctx, sbox.width = util_format_get_nblocksx(src->format, src_box->width); src_box = &sbox; } else { - unsigned blocksize = util_format_get_blocksize(src->format); + unsigned blocksize = rsrc->surface.bpe; switch (blocksize) { case 1: |