From: Marek Olšák <[email protected]>

---
 src/gallium/drivers/radeon/r600_texture.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/gallium/drivers/radeon/r600_texture.c 
b/src/gallium/drivers/radeon/r600_texture.c
index f0c1bec..663d6fc 100644
--- a/src/gallium/drivers/radeon/r600_texture.c
+++ b/src/gallium/drivers/radeon/r600_texture.c
@@ -233,24 +233,21 @@ static int r600_init_surface(struct r600_common_screen 
*rscreen,
        unsigned i, bpe, flags = 0;
 
        is_depth = util_format_has_depth(desc);
        is_stencil = util_format_has_stencil(desc);
 
        if (rscreen->chip_class >= EVERGREEN && !is_flushed_depth &&
            ptex->format == PIPE_FORMAT_Z32_FLOAT_S8X24_UINT) {
                bpe = 4; /* stencil is allocated separately on evergreen */
        } else {
                bpe = util_format_get_blocksize(ptex->format);
-               /* align byte per element on dword */
-               if (bpe == 3) {
-                       bpe = 4;
-               }
+               assert(util_is_power_of_two(bpe));
        }
 
        if (!is_flushed_depth && is_depth) {
                flags |= RADEON_SURF_ZBUFFER;
 
                if (tc_compatible_htile &&
                    (rscreen->chip_class >= GFX9 ||
                     array_mode == RADEON_SURF_MODE_2D)) {
                        /* TC-compatible HTILE only supports Z32_FLOAT.
                         * GFX9 also supports Z16_UNORM.
-- 
2.7.4

_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to