diff options
author | Jason Ekstrand <[email protected]> | 2016-01-27 11:47:07 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-01-27 15:12:42 -0800 |
commit | 96cf5cfee14633a77d5cf3f01df3183f9e164434 (patch) | |
tree | b267e7cfa26f3e37489339ced4a2dbd4d370777d | |
parent | 1bea1eff38b5b71c1019efce4cbf2e05ce7cd80b (diff) |
anv/image: Minify before dividing by block dimensions
-rw-r--r-- | src/vulkan/anv_image.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/vulkan/anv_image.c b/src/vulkan/anv_image.c index 9294bab621d..2622b11b89e 100644 --- a/src/vulkan/anv_image.c +++ b/src/vulkan/anv_image.c @@ -544,18 +544,18 @@ anv_image_view_init(struct anv_image_view *iview, * data from a source Image to a destination Image. */ const struct isl_format_layout * isl_layout = image->format->isl_layout; - iview->level_0_extent.width = DIV_ROUND_UP(image->extent.width , isl_layout->bw); - iview->level_0_extent.height = DIV_ROUND_UP(image->extent.height, isl_layout->bh); - iview->level_0_extent.depth = DIV_ROUND_UP(image->extent.depth , isl_layout->bd); - iview->level_0_extent.width = anv_minify(iview->level_0_extent.width , range->baseMipLevel); - iview->level_0_extent.height = anv_minify(iview->level_0_extent.height, range->baseMipLevel); - iview->level_0_extent.depth = anv_minify(iview->level_0_extent.depth , range->baseMipLevel); + iview->level_0_extent.width = anv_minify(image->extent.width, range->baseMipLevel); + iview->level_0_extent.height = anv_minify(image->extent.height, range->baseMipLevel); + iview->level_0_extent.depth = anv_minify(image->extent.depth, range->baseMipLevel); + iview->level_0_extent.width = DIV_ROUND_UP(iview->level_0_extent.width, isl_layout->bw); + iview->level_0_extent.height = DIV_ROUND_UP(iview->level_0_extent.height, isl_layout->bh); + iview->level_0_extent.depth = DIV_ROUND_UP(iview->level_0_extent.depth, isl_layout->bd); mCreateInfo.subresourceRange.baseMipLevel = 0; mCreateInfo.subresourceRange.baseArrayLayer = 0; } else { - iview->level_0_extent.width = image->extent.width ; + iview->level_0_extent.width = image->extent.width; iview->level_0_extent.height = image->extent.height; - iview->level_0_extent.depth = image->extent.depth ; + iview->level_0_extent.depth = image->extent.depth; } iview->extent = (VkExtent3D) { |