diff options
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_texture.c')
-rw-r--r-- | src/gallium/drivers/softpipe/sp_texture.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/softpipe/sp_texture.c b/src/gallium/drivers/softpipe/sp_texture.c index 370f2b43c4d..f731bdc22b2 100644 --- a/src/gallium/drivers/softpipe/sp_texture.c +++ b/src/gallium/drivers/softpipe/sp_texture.c @@ -60,7 +60,7 @@ softpipe_resource_layout(struct pipe_screen *screen, unsigned width = pt->width0; unsigned height = pt->height0; unsigned depth = pt->depth0; - unsigned buffer_size = 0; + uint64_t buffer_size = 0; for (level = 0; level <= pt->last_level; level++) { unsigned slices; @@ -76,8 +76,8 @@ softpipe_resource_layout(struct pipe_screen *screen, spr->level_offset[level] = buffer_size; - buffer_size += (util_format_get_nblocksy(pt->format, height) * - slices * spr->stride[level]); + buffer_size += (uint64_t) util_format_get_nblocksy(pt->format, height) * + slices * spr->stride[level]; width = u_minify(width, 1); height = u_minify(height, 1); |