diff options
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_atom_texture.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_atom_texture.c b/src/mesa/state_tracker/st_atom_texture.c index 31e0f6ba06c..3e3775200a8 100644 --- a/src/mesa/state_tracker/st_atom_texture.c +++ b/src/mesa/state_tracker/st_atom_texture.c @@ -274,8 +274,8 @@ st_create_texture_sampler_view_from_stobj(struct pipe_context *pipe, return NULL; size = MIN2(stObj->pt->width0 - base, (unsigned)stObj->base.BufferSize); - f = ((base * 8) / desc->block.bits) * desc->block.width; - n = ((size * 8) / desc->block.bits) * desc->block.width; + f = (base / (desc->block.bits / 8)) * desc->block.width; + n = (size / (desc->block.bits / 8)) * desc->block.width; if (!n) return NULL; templ.u.buf.first_element = f; |