diff options
author | Grigori Goronzy <[email protected]> | 2014-06-04 18:54:36 +0200 |
---|---|---|
committer | Christian König <[email protected]> | 2014-06-18 13:58:19 +0200 |
commit | f5dafc156a28f6550b6a0bfd5153b40448402f0c (patch) | |
tree | 36adec4f3ad2da239d5323362588a2d1cd03f441 /src/gallium/drivers/r600 | |
parent | 700100d94bcd46b6088c27cc77e12f86f9fda122 (diff) |
util/u_format: move utility function from r600g
We need this for radeonsi, and it might be useful for other drivers,
too.
Diffstat (limited to 'src/gallium/drivers/r600')
-rw-r--r-- | src/gallium/drivers/r600/r600_blit.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/gallium/drivers/r600/r600_blit.c b/src/gallium/drivers/r600/r600_blit.c index 3269c476fd4..962be60c108 100644 --- a/src/gallium/drivers/r600/r600_blit.c +++ b/src/gallium/drivers/r600/r600_blit.c @@ -563,16 +563,6 @@ static void r600_clear_buffer(struct pipe_context *ctx, struct pipe_resource *ds } } -static bool util_format_is_subsampled_2x1_32bpp(enum pipe_format format) -{ - const struct util_format_description *desc = util_format_description(format); - - return desc->layout == UTIL_FORMAT_LAYOUT_SUBSAMPLED && - desc->block.width == 2 && - desc->block.height == 1 && - desc->block.bits == 32; -} - static void r600_resource_copy_region(struct pipe_context *ctx, struct pipe_resource *dst, unsigned dst_level, @@ -647,7 +637,7 @@ static void r600_resource_copy_region(struct pipe_context *ctx, src_force_level = src_level; } else if (!util_blitter_is_copy_supported(rctx->blitter, dst, src)) { - if (util_format_is_subsampled_2x1_32bpp(src->format)) { + if (util_format_is_subsampled_422(src->format)) { src_templ.format = PIPE_FORMAT_R8G8B8A8_UINT; dst_templ.format = PIPE_FORMAT_R8G8B8A8_UINT; |