early-access version 3888
This commit is contained in:
parent
eafc13082a
commit
f1bfd88735
3 changed files with 8 additions and 17 deletions
|
@ -1,7 +1,7 @@
|
||||||
yuzu emulator early access
|
yuzu emulator early access
|
||||||
=============
|
=============
|
||||||
|
|
||||||
This is the source code for early-access 3887.
|
This is the source code for early-access 3888.
|
||||||
|
|
||||||
## Legal Notice
|
## Legal Notice
|
||||||
|
|
||||||
|
|
|
@ -664,7 +664,8 @@ class MainActivity : AppCompatActivity(), ThemeProvider {
|
||||||
checkStream.use { stream ->
|
checkStream.use { stream ->
|
||||||
var ze: ZipEntry? = null
|
var ze: ZipEntry? = null
|
||||||
while (stream.nextEntry?.also { ze = it } != null) {
|
while (stream.nextEntry?.also { ze = it } != null) {
|
||||||
if (ze!!.name.trim() == "/config/config.ini") {
|
val itemName = ze!!.name.trim()
|
||||||
|
if (itemName == "/config/config.ini" || itemName == "config/config.ini") {
|
||||||
isYuzuBackup = true
|
isYuzuBackup = true
|
||||||
return@use
|
return@use
|
||||||
}
|
}
|
||||||
|
|
|
@ -120,19 +120,9 @@ constexpr VkBorderColor ConvertBorderColor(const std::array<float, 4>& color) {
|
||||||
return usage;
|
return usage;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the preferred format for a VkImage
|
|
||||||
[[nodiscard]] PixelFormat StorageFormat(PixelFormat format) {
|
|
||||||
switch (format) {
|
|
||||||
case PixelFormat::A8B8G8R8_SRGB:
|
|
||||||
return PixelFormat::A8B8G8R8_UNORM;
|
|
||||||
default:
|
|
||||||
return format;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[[nodiscard]] VkImageCreateInfo MakeImageCreateInfo(const Device& device, const ImageInfo& info) {
|
[[nodiscard]] VkImageCreateInfo MakeImageCreateInfo(const Device& device, const ImageInfo& info) {
|
||||||
const PixelFormat format = StorageFormat(info.format);
|
const auto format_info =
|
||||||
const auto format_info = MaxwellToVK::SurfaceFormat(device, FormatType::Optimal, false, format);
|
MaxwellToVK::SurfaceFormat(device, FormatType::Optimal, false, info.format);
|
||||||
VkImageCreateFlags flags{};
|
VkImageCreateFlags flags{};
|
||||||
if (info.type == ImageType::e2D && info.resources.layers >= 6 &&
|
if (info.type == ImageType::e2D && info.resources.layers >= 6 &&
|
||||||
info.size.width == info.size.height && !device.HasBrokenCubeImageCompability()) {
|
info.size.width == info.size.height && !device.HasBrokenCubeImageCompability()) {
|
||||||
|
@ -157,7 +147,7 @@ constexpr VkBorderColor ConvertBorderColor(const std::array<float, 4>& color) {
|
||||||
.arrayLayers = static_cast<u32>(info.resources.layers),
|
.arrayLayers = static_cast<u32>(info.resources.layers),
|
||||||
.samples = ConvertSampleCount(info.num_samples),
|
.samples = ConvertSampleCount(info.num_samples),
|
||||||
.tiling = VK_IMAGE_TILING_OPTIMAL,
|
.tiling = VK_IMAGE_TILING_OPTIMAL,
|
||||||
.usage = ImageUsageFlags(format_info, format),
|
.usage = ImageUsageFlags(format_info, info.format),
|
||||||
.sharingMode = VK_SHARING_MODE_EXCLUSIVE,
|
.sharingMode = VK_SHARING_MODE_EXCLUSIVE,
|
||||||
.queueFamilyIndexCount = 0,
|
.queueFamilyIndexCount = 0,
|
||||||
.pQueueFamilyIndices = nullptr,
|
.pQueueFamilyIndices = nullptr,
|
||||||
|
@ -1643,8 +1633,8 @@ bool Image::NeedsScaleHelper() const {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
static constexpr auto OPTIMAL_FORMAT = FormatType::Optimal;
|
static constexpr auto OPTIMAL_FORMAT = FormatType::Optimal;
|
||||||
const PixelFormat format = StorageFormat(info.format);
|
const auto vk_format =
|
||||||
const auto vk_format = MaxwellToVK::SurfaceFormat(device, OPTIMAL_FORMAT, false, format).format;
|
MaxwellToVK::SurfaceFormat(device, OPTIMAL_FORMAT, false, info.format).format;
|
||||||
const auto blit_usage = VK_FORMAT_FEATURE_BLIT_SRC_BIT | VK_FORMAT_FEATURE_BLIT_DST_BIT;
|
const auto blit_usage = VK_FORMAT_FEATURE_BLIT_SRC_BIT | VK_FORMAT_FEATURE_BLIT_DST_BIT;
|
||||||
const bool needs_blit_helper = !device.IsFormatSupported(vk_format, blit_usage, OPTIMAL_FORMAT);
|
const bool needs_blit_helper = !device.IsFormatSupported(vk_format, blit_usage, OPTIMAL_FORMAT);
|
||||||
return needs_blit_helper;
|
return needs_blit_helper;
|
||||||
|
|
Loading…
Reference in a new issue