(box->y / desc->block.height) * srl.rowPitch +
(box->x / desc->block.width) * (desc->block.bits / 8);
if (!res->obj->coherent) {
- VkDeviceSize size = box->width * box->height * desc->block.bits / 8;
+ VkDeviceSize size = (VkDeviceSize)box->width * box->height * desc->block.bits / 8;
VkMappedMemoryRange range = zink_resource_init_mem_range(screen, res->obj, res->obj->offset + offset, size);
vkFlushMappedMemoryRanges(screen->dev, 1, &range);
}
size = box->width;
offset = trans->offset;
} else {
- size = box->width * box->height * util_format_get_blocksize(m->base.b.format);
+ size = (VkDeviceSize)box->width * box->height * util_format_get_blocksize(m->base.b.format);
offset = trans->offset +
box->z * trans->depthPitch +
util_format_get_2d_size(m->base.b.format, trans->base.b.stride, box->y) +