|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
struct pipe_resource *pt = &mt->base.base; |
|
|
struct pipe_resource *pt = &mt->base.base; |
|
|
const unsigned blocksize = util_format_get_blocksize(pt->format); |
|
|
const unsigned blocksize = util_format_get_blocksize(pt->format); |
|
|
|
|
|
unsigned h = pt->height0; |
|
|
|
|
|
|
|
|
if (util_format_is_depth_or_stencil(pt->format)) |
|
|
if (util_format_is_depth_or_stencil(pt->format)) |
|
|
return FALSE; |
|
|
return FALSE; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mt->level[0].pitch = align(pt->width0 * blocksize, 64); |
|
|
mt->level[0].pitch = align(pt->width0 * blocksize, 64); |
|
|
|
|
|
|
|
|
mt->total_size = mt->level[0].pitch * pt->height0; |
|
|
|
|
|
|
|
|
/* Account for very generous prefetch (allocate size as if tiled). */ |
|
|
|
|
|
h = MAX2(h, 8); |
|
|
|
|
|
h = util_next_power_of_two(h); |
|
|
|
|
|
|
|
|
|
|
|
mt->total_size = mt->level[0].pitch * h; |
|
|
|
|
|
|
|
|
return TRUE; |
|
|
return TRUE; |
|
|
} |
|
|
} |