Commit c41fad91 authored by Chris Blume's avatar Chris Blume Committed by Commit Bot

Fix build on MIPS chips

We recently enabled Vulkan build by default. However, in the Vulkan code
is "mips" which is #define mips 1 on MIPS builds.

It is easy enough to just rename this instance to mip_levels. It is also
more descriptive anyway. And then it fixes builds targetting MIPS chips.

BUG=853174

Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I45b75b4deaa8c95fba47e8958d9283c49a5f405f
Reviewed-on: https://chromium-review.googlesource.com/1102672Reviewed-by: default avatarAntoine Labour <piman@chromium.org>
Commit-Queue: Chris Blume <cblume@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567809}
parent 0c634107
...@@ -43,7 +43,7 @@ bool VulkanImageView::Initialize(VkImage image, ...@@ -43,7 +43,7 @@ bool VulkanImageView::Initialize(VkImage image,
uint32_t width, uint32_t width,
uint32_t height, uint32_t height,
uint32_t base_mip_level, uint32_t base_mip_level,
uint32_t num_mips, uint32_t mip_levels,
uint32_t base_layer_level, uint32_t base_layer_level,
uint32_t num_layers) { uint32_t num_layers) {
format_ = format; format_ = format;
...@@ -55,7 +55,7 @@ bool VulkanImageView::Initialize(VkImage image, ...@@ -55,7 +55,7 @@ bool VulkanImageView::Initialize(VkImage image,
VkImageSubresourceRange image_subresource_range = {}; VkImageSubresourceRange image_subresource_range = {};
image_subresource_range.aspectMask = kAspectFlags[image_type]; image_subresource_range.aspectMask = kAspectFlags[image_type];
image_subresource_range.baseMipLevel = base_mip_level; image_subresource_range.baseMipLevel = base_mip_level;
image_subresource_range.levelCount = num_mips; image_subresource_range.levelCount = mip_levels;
image_subresource_range.baseArrayLayer = base_layer_level; image_subresource_range.baseArrayLayer = base_layer_level;
image_subresource_range.layerCount = num_layers; image_subresource_range.layerCount = num_layers;
...@@ -80,7 +80,7 @@ bool VulkanImageView::Initialize(VkImage image, ...@@ -80,7 +80,7 @@ bool VulkanImageView::Initialize(VkImage image,
image_type_ = image_type; image_type_ = image_type;
width_ = width; width_ = width;
height_ = height; height_ = height;
mips_ = num_mips; mip_levels_ = mip_levels;
layers_ = num_layers; layers_ = num_layers;
return true; return true;
} }
......
...@@ -35,7 +35,7 @@ class VulkanImageView { ...@@ -35,7 +35,7 @@ class VulkanImageView {
uint32_t width, uint32_t width,
uint32_t height, uint32_t height,
uint32_t base_mip_level, uint32_t base_mip_level,
uint32_t num_mips, uint32_t mip_levels,
uint32_t base_layer_level, uint32_t base_layer_level,
uint32_t num_layers); uint32_t num_layers);
void Destroy(); void Destroy();
...@@ -45,7 +45,7 @@ class VulkanImageView { ...@@ -45,7 +45,7 @@ class VulkanImageView {
VkFormat format() const { return format_; } VkFormat format() const { return format_; }
uint32_t width() const { return width_; } uint32_t width() const { return width_; }
uint32_t height() const { return height_; } uint32_t height() const { return height_; }
uint32_t mips() const { return mips_; } uint32_t mip_levels() const { return mip_levels_; }
uint32_t layers() const { return layers_; } uint32_t layers() const { return layers_; }
private: private:
...@@ -55,7 +55,7 @@ class VulkanImageView { ...@@ -55,7 +55,7 @@ class VulkanImageView {
VkFormat format_ = VK_FORMAT_UNDEFINED; VkFormat format_ = VK_FORMAT_UNDEFINED;
uint32_t width_ = 0; uint32_t width_ = 0;
uint32_t height_ = 0; uint32_t height_ = 0;
uint32_t mips_ = 0; uint32_t mip_levels_ = 0;
uint32_t layers_ = 0; uint32_t layers_ = 0;
DISALLOW_COPY_AND_ASSIGN(VulkanImageView); DISALLOW_COPY_AND_ASSIGN(VulkanImageView);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment