early-access version 3437
This commit is contained in:
parent
ad5e9aec42
commit
1d866e0d61
@ -1,7 +1,7 @@
|
||||
yuzu emulator early access
|
||||
=============
|
||||
|
||||
This is the source code for early-access 3436.
|
||||
This is the source code for early-access 3437.
|
||||
|
||||
## Legal Notice
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <chrono>
|
||||
|
||||
#include "common/common_types.h"
|
||||
|
@ -15,9 +15,8 @@ namespace Common {
|
||||
class StandardWallClock final : public WallClock {
|
||||
public:
|
||||
explicit StandardWallClock(u64 emulated_cpu_frequency_, u64 emulated_clock_frequency_)
|
||||
: WallClock{emulated_cpu_frequency_, emulated_clock_frequency_, false} {
|
||||
start_time = SteadyClock::Now();
|
||||
}
|
||||
: WallClock{emulated_cpu_frequency_, emulated_clock_frequency_, false},
|
||||
start_time{SteadyClock::Now()} {}
|
||||
|
||||
std::chrono::nanoseconds GetTimeNS() override {
|
||||
return SteadyClock::Now() - start_time;
|
||||
|
@ -1,6 +1,8 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <chrono>
|
||||
|
||||
namespace Common::Windows {
|
||||
|
@ -787,7 +787,7 @@ bool AccelerateDMA::ImageToBuffer(const Tegra::DMA::ImageCopy& copy_info,
|
||||
|
||||
const bool is_rescaled = image->IsRescaled();
|
||||
if (is_rescaled) {
|
||||
image->ScaleDown(true);
|
||||
image->ScaleDown();
|
||||
}
|
||||
VkImageSubresourceLayers subresources{
|
||||
.aspectMask = image->AspectMask(),
|
||||
@ -879,6 +879,9 @@ bool AccelerateDMA::ImageToBuffer(const Tegra::DMA::ImageCopy& copy_info,
|
||||
cmdbuf.PipelineBarrier(VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT,
|
||||
0, WRITE_BARRIER, nullptr, post_barriers);
|
||||
});
|
||||
if (is_rescaled) {
|
||||
image->ScaleUp(true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -989,6 +992,9 @@ bool AccelerateDMA::BufferToImage(const Tegra::DMA::ImageCopy& copy_info,
|
||||
cmdbuf.PipelineBarrier(VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT,
|
||||
0, nullptr, nullptr, post_barriers);
|
||||
});
|
||||
if (is_rescaled) {
|
||||
image->ScaleUp();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -216,8 +216,7 @@ ImageInfo::ImageInfo(const Tegra::Engines::Fermi2D::Surface& config) noexcept {
|
||||
.height = config.height,
|
||||
.depth = 1,
|
||||
};
|
||||
rescaleable = block.depth == 0;
|
||||
rescaleable &= size.height > 256;
|
||||
rescaleable = block.depth == 0 && size.height > 256;
|
||||
downscaleable = size.height > 512;
|
||||
}
|
||||
}
|
||||
@ -260,8 +259,7 @@ ImageInfo::ImageInfo(const Tegra::DMA::ImageOperand& config) noexcept {
|
||||
resources.layers = 1;
|
||||
layer_stride = CalculateLayerStride(*this);
|
||||
maybe_unaligned_layer_stride = CalculateLayerSize(*this);
|
||||
rescaleable = block.depth == 0;
|
||||
rescaleable &= size.height > 256;
|
||||
rescaleable = block.depth == 0 && size.height > 256;
|
||||
downscaleable = size.height > 512;
|
||||
}
|
||||
|
||||
|
@ -1125,11 +1125,10 @@ std::optional<SubresourceBase> FindSubresource(const ImageInfo& candidate, const
|
||||
// Format checking is relaxed, but we still have to check for matching bytes per block.
|
||||
// This avoids creating a view for blits on UE4 titles where formats with different bytes
|
||||
// per block are aliased.
|
||||
if (BytesPerBlock(existing.format) != BytesPerBlock(candidate.format)) {
|
||||
if (False(options & RelaxedOptions::FormatBpp)) {
|
||||
if (BytesPerBlock(existing.format) != BytesPerBlock(candidate.format) &&
|
||||
False(options & RelaxedOptions::FormatBpp)) {
|
||||
return std::nullopt;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Format comaptibility is not relaxed, ensure we are creating a view on a compatible format
|
||||
if (!IsViewCompatible(existing.format, candidate.format, broken_views, native_bgr)) {
|
||||
@ -1142,11 +1141,9 @@ std::optional<SubresourceBase> FindSubresource(const ImageInfo& candidate, const
|
||||
if (existing.type != candidate.type) {
|
||||
return std::nullopt;
|
||||
}
|
||||
if (False(options & RelaxedOptions::Samples)) {
|
||||
if (existing.num_samples != candidate.num_samples) {
|
||||
if (False(options & RelaxedOptions::Samples) && existing.num_samples != candidate.num_samples) {
|
||||
return std::nullopt;
|
||||
}
|
||||
}
|
||||
if (existing.resources.levels < candidate.resources.levels + base->level) {
|
||||
return std::nullopt;
|
||||
}
|
||||
@ -1155,11 +1152,9 @@ std::optional<SubresourceBase> FindSubresource(const ImageInfo& candidate, const
|
||||
if (mip_depth < candidate.size.depth + base->layer) {
|
||||
return std::nullopt;
|
||||
}
|
||||
} else {
|
||||
if (existing.resources.layers < candidate.resources.layers + base->layer) {
|
||||
} else if (existing.resources.layers < candidate.resources.layers + base->layer) {
|
||||
return std::nullopt;
|
||||
}
|
||||
}
|
||||
const bool strict_size = False(options & RelaxedOptions::Size);
|
||||
if (!IsBlockLinearSizeCompatible(existing, candidate, base->level, 0, strict_size)) {
|
||||
if (False(options & RelaxedOptions::FormatBpp)) {
|
||||
|
Loading…
Reference in New Issue
Block a user