|
|
@ -1406,7 +1406,7 @@ Image::Image(TextureCacheRuntime& runtime_, const ImageInfo& info_, GPUVAddr gpu
|
|
|
|
if (runtime->device.HasDebuggingToolAttached()) {
|
|
|
|
if (runtime->device.HasDebuggingToolAttached()) {
|
|
|
|
original_image.SetObjectNameEXT(VideoCommon::Name(*this).c_str());
|
|
|
|
original_image.SetObjectNameEXT(VideoCommon::Name(*this).c_str());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
current_image = *original_image;
|
|
|
|
current_image = &Image::original_image;
|
|
|
|
storage_image_views.resize(info.resources.levels);
|
|
|
|
storage_image_views.resize(info.resources.levels);
|
|
|
|
if (IsPixelFormatASTC(info.format) && !runtime->device.IsOptimalAstcSupported() &&
|
|
|
|
if (IsPixelFormatASTC(info.format) && !runtime->device.IsOptimalAstcSupported() &&
|
|
|
|
Settings::values.astc_recompression.GetValue() ==
|
|
|
|
Settings::values.astc_recompression.GetValue() ==
|
|
|
@ -1550,8 +1550,8 @@ VkImageView Image::StorageImageView(s32 level) noexcept {
|
|
|
|
if (!view) {
|
|
|
|
if (!view) {
|
|
|
|
const auto format_info =
|
|
|
|
const auto format_info =
|
|
|
|
MaxwellToVK::SurfaceFormat(runtime->device, FormatType::Optimal, true, info.format);
|
|
|
|
MaxwellToVK::SurfaceFormat(runtime->device, FormatType::Optimal, true, info.format);
|
|
|
|
view =
|
|
|
|
view = MakeStorageView(runtime->device.GetLogical(), level, *(this->*current_image),
|
|
|
|
MakeStorageView(runtime->device.GetLogical(), level, current_image, format_info.format);
|
|
|
|
format_info.format);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return *view;
|
|
|
|
return *view;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1582,7 +1582,7 @@ bool Image::ScaleUp(bool ignore) {
|
|
|
|
runtime->ViewFormats(info.format));
|
|
|
|
runtime->ViewFormats(info.format));
|
|
|
|
ignore = false;
|
|
|
|
ignore = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
current_image = *scaled_image;
|
|
|
|
current_image = &Image::scaled_image;
|
|
|
|
if (ignore) {
|
|
|
|
if (ignore) {
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1607,7 +1607,7 @@ bool Image::ScaleDown(bool ignore) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
ASSERT(info.type != ImageType::Linear);
|
|
|
|
ASSERT(info.type != ImageType::Linear);
|
|
|
|
flags &= ~ImageFlagBits::Rescaled;
|
|
|
|
flags &= ~ImageFlagBits::Rescaled;
|
|
|
|
current_image = *original_image;
|
|
|
|
current_image = &Image::original_image;
|
|
|
|
if (ignore) {
|
|
|
|
if (ignore) {
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1726,7 +1726,7 @@ ImageView::ImageView(TextureCacheRuntime& runtime, const VideoCommon::ImageViewI
|
|
|
|
const VkImageViewUsageCreateInfo image_view_usage{
|
|
|
|
const VkImageViewUsageCreateInfo image_view_usage{
|
|
|
|
.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO,
|
|
|
|
.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO,
|
|
|
|
.pNext = nullptr,
|
|
|
|
.pNext = nullptr,
|
|
|
|
.usage = ImageUsageFlags(format_info, format),
|
|
|
|
.usage = image.UsageFlags(),
|
|
|
|
};
|
|
|
|
};
|
|
|
|
const VkImageViewCreateInfo create_info{
|
|
|
|
const VkImageViewCreateInfo create_info{
|
|
|
|
.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO,
|
|
|
|
.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO,
|
|
|
@ -2087,4 +2087,4 @@ void TextureCacheRuntime::TransitionImageLayout(Image& image) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace Vulkan
|
|
|
|
} // namespace Vulkan
|
|
|
|