early-access version 2813
This commit is contained in:
parent
ae4471e68a
commit
dc2419801a
9 changed files with 18 additions and 9 deletions
|
@ -1,7 +1,7 @@
|
||||||
yuzu emulator early access
|
yuzu emulator early access
|
||||||
=============
|
=============
|
||||||
|
|
||||||
This is the source code for early-access 2812.
|
This is the source code for early-access 2813.
|
||||||
|
|
||||||
## Legal Notice
|
## Legal Notice
|
||||||
|
|
||||||
|
|
|
@ -64,9 +64,6 @@ void CoreTiming::Initialize(std::function<void()>&& on_thread_init_) {
|
||||||
const auto hardware_concurrency = std::thread::hardware_concurrency();
|
const auto hardware_concurrency = std::thread::hardware_concurrency();
|
||||||
size_t id = 0;
|
size_t id = 0;
|
||||||
worker_threads.emplace_back(ThreadEntry, std::ref(*this), id++);
|
worker_threads.emplace_back(ThreadEntry, std::ref(*this), id++);
|
||||||
if (hardware_concurrency > 8) {
|
|
||||||
worker_threads.emplace_back(ThreadEntry, std::ref(*this), id++);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -228,14 +225,11 @@ std::optional<s64> CoreTiming::Advance() {
|
||||||
event_queue.pop_back();
|
event_queue.pop_back();
|
||||||
|
|
||||||
if (const auto event_type{evt.type.lock()}) {
|
if (const auto event_type{evt.type.lock()}) {
|
||||||
sequence_mutex.lock();
|
|
||||||
event_mutex.unlock();
|
event_mutex.unlock();
|
||||||
|
|
||||||
event_type->guard.lock();
|
|
||||||
sequence_mutex.unlock();
|
|
||||||
const s64 delay = static_cast<s64>(GetGlobalTimeNs().count() - evt.time);
|
const s64 delay = static_cast<s64>(GetGlobalTimeNs().count() - evt.time);
|
||||||
event_type->callback(evt.user_data, std::chrono::nanoseconds{delay});
|
event_type->callback(evt.user_data, std::chrono::nanoseconds{delay});
|
||||||
event_type->guard.unlock();
|
|
||||||
|
|
||||||
event_mutex.lock();
|
event_mutex.lock();
|
||||||
pending_events.fetch_sub(1, std::memory_order_relaxed);
|
pending_events.fetch_sub(1, std::memory_order_relaxed);
|
||||||
|
|
|
@ -131,9 +131,12 @@ constexpr std::array VIEW_CLASS_ASTC_8x8_RGBA{
|
||||||
// PixelFormat::ASTC_2D_10X5_SRGB
|
// PixelFormat::ASTC_2D_10X5_SRGB
|
||||||
|
|
||||||
// Missing formats:
|
// Missing formats:
|
||||||
// PixelFormat::ASTC_2D_10X6_UNORM
|
|
||||||
// PixelFormat::ASTC_2D_10X6_SRGB
|
// PixelFormat::ASTC_2D_10X6_SRGB
|
||||||
|
|
||||||
|
constexpr std::array VIEW_CLASS_ASTC_10x6_RGBA{
|
||||||
|
PixelFormat::ASTC_2D_10X6_UNORM,
|
||||||
|
};
|
||||||
|
|
||||||
constexpr std::array VIEW_CLASS_ASTC_10x8_RGBA{
|
constexpr std::array VIEW_CLASS_ASTC_10x8_RGBA{
|
||||||
PixelFormat::ASTC_2D_10X8_UNORM,
|
PixelFormat::ASTC_2D_10X8_UNORM,
|
||||||
PixelFormat::ASTC_2D_10X8_SRGB,
|
PixelFormat::ASTC_2D_10X8_SRGB,
|
||||||
|
@ -226,6 +229,7 @@ constexpr Table MakeViewTable() {
|
||||||
EnableRange(view, VIEW_CLASS_ASTC_6x6_RGBA);
|
EnableRange(view, VIEW_CLASS_ASTC_6x6_RGBA);
|
||||||
EnableRange(view, VIEW_CLASS_ASTC_8x5_RGBA);
|
EnableRange(view, VIEW_CLASS_ASTC_8x5_RGBA);
|
||||||
EnableRange(view, VIEW_CLASS_ASTC_8x8_RGBA);
|
EnableRange(view, VIEW_CLASS_ASTC_8x8_RGBA);
|
||||||
|
EnableRange(view, VIEW_CLASS_ASTC_10x6_RGBA);
|
||||||
EnableRange(view, VIEW_CLASS_ASTC_10x8_RGBA);
|
EnableRange(view, VIEW_CLASS_ASTC_10x8_RGBA);
|
||||||
EnableRange(view, VIEW_CLASS_ASTC_10x10_RGBA);
|
EnableRange(view, VIEW_CLASS_ASTC_10x10_RGBA);
|
||||||
EnableRange(view, VIEW_CLASS_ASTC_12x12_RGBA);
|
EnableRange(view, VIEW_CLASS_ASTC_12x12_RGBA);
|
||||||
|
|
|
@ -98,6 +98,7 @@ constexpr std::array<FormatTuple, VideoCore::Surface::MaxPixelFormat> FORMAT_TAB
|
||||||
{GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR}, // ASTC_2D_10X8_SRGB
|
{GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR}, // ASTC_2D_10X8_SRGB
|
||||||
{GL_COMPRESSED_RGBA_ASTC_6x6_KHR}, // ASTC_2D_6X6_UNORM
|
{GL_COMPRESSED_RGBA_ASTC_6x6_KHR}, // ASTC_2D_6X6_UNORM
|
||||||
{GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR}, // ASTC_2D_6X6_SRGB
|
{GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR}, // ASTC_2D_6X6_SRGB
|
||||||
|
{GL_COMPRESSED_RGBA_ASTC_10x6_KHR}, // ASTC_2D_10X6_UNORM
|
||||||
{GL_COMPRESSED_RGBA_ASTC_10x10_KHR}, // ASTC_2D_10X10_UNORM
|
{GL_COMPRESSED_RGBA_ASTC_10x10_KHR}, // ASTC_2D_10X10_UNORM
|
||||||
{GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR}, // ASTC_2D_10X10_SRGB
|
{GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR}, // ASTC_2D_10X10_SRGB
|
||||||
{GL_COMPRESSED_RGBA_ASTC_12x12_KHR}, // ASTC_2D_12X12_UNORM
|
{GL_COMPRESSED_RGBA_ASTC_12x12_KHR}, // ASTC_2D_12X12_UNORM
|
||||||
|
|
|
@ -195,6 +195,7 @@ struct FormatTuple {
|
||||||
{VK_FORMAT_ASTC_10x8_SRGB_BLOCK}, // ASTC_2D_10X8_SRGB
|
{VK_FORMAT_ASTC_10x8_SRGB_BLOCK}, // ASTC_2D_10X8_SRGB
|
||||||
{VK_FORMAT_ASTC_6x6_UNORM_BLOCK}, // ASTC_2D_6X6_UNORM
|
{VK_FORMAT_ASTC_6x6_UNORM_BLOCK}, // ASTC_2D_6X6_UNORM
|
||||||
{VK_FORMAT_ASTC_6x6_SRGB_BLOCK}, // ASTC_2D_6X6_SRGB
|
{VK_FORMAT_ASTC_6x6_SRGB_BLOCK}, // ASTC_2D_6X6_SRGB
|
||||||
|
{VK_FORMAT_ASTC_10x6_UNORM_BLOCK}, // ASTC_2D_10X6_UNORM
|
||||||
{VK_FORMAT_ASTC_10x10_UNORM_BLOCK}, // ASTC_2D_10X10_UNORM
|
{VK_FORMAT_ASTC_10x10_UNORM_BLOCK}, // ASTC_2D_10X10_UNORM
|
||||||
{VK_FORMAT_ASTC_10x10_SRGB_BLOCK}, // ASTC_2D_10X10_SRGB
|
{VK_FORMAT_ASTC_10x10_SRGB_BLOCK}, // ASTC_2D_10X10_SRGB
|
||||||
{VK_FORMAT_ASTC_12x12_UNORM_BLOCK}, // ASTC_2D_12X12_UNORM
|
{VK_FORMAT_ASTC_12x12_UNORM_BLOCK}, // ASTC_2D_12X12_UNORM
|
||||||
|
|
|
@ -247,6 +247,7 @@ bool IsPixelFormatASTC(PixelFormat format) {
|
||||||
case PixelFormat::ASTC_2D_10X8_SRGB:
|
case PixelFormat::ASTC_2D_10X8_SRGB:
|
||||||
case PixelFormat::ASTC_2D_6X6_UNORM:
|
case PixelFormat::ASTC_2D_6X6_UNORM:
|
||||||
case PixelFormat::ASTC_2D_6X6_SRGB:
|
case PixelFormat::ASTC_2D_6X6_SRGB:
|
||||||
|
case PixelFormat::ASTC_2D_10X6_UNORM:
|
||||||
case PixelFormat::ASTC_2D_10X10_UNORM:
|
case PixelFormat::ASTC_2D_10X10_UNORM:
|
||||||
case PixelFormat::ASTC_2D_10X10_SRGB:
|
case PixelFormat::ASTC_2D_10X10_SRGB:
|
||||||
case PixelFormat::ASTC_2D_12X12_UNORM:
|
case PixelFormat::ASTC_2D_12X12_UNORM:
|
||||||
|
|
|
@ -94,6 +94,7 @@ enum class PixelFormat {
|
||||||
ASTC_2D_10X8_SRGB,
|
ASTC_2D_10X8_SRGB,
|
||||||
ASTC_2D_6X6_UNORM,
|
ASTC_2D_6X6_UNORM,
|
||||||
ASTC_2D_6X6_SRGB,
|
ASTC_2D_6X6_SRGB,
|
||||||
|
ASTC_2D_10X6_UNORM,
|
||||||
ASTC_2D_10X10_UNORM,
|
ASTC_2D_10X10_UNORM,
|
||||||
ASTC_2D_10X10_SRGB,
|
ASTC_2D_10X10_SRGB,
|
||||||
ASTC_2D_12X12_UNORM,
|
ASTC_2D_12X12_UNORM,
|
||||||
|
@ -227,6 +228,7 @@ constexpr std::array<u8, MaxPixelFormat> BLOCK_WIDTH_TABLE = {{
|
||||||
10, // ASTC_2D_10X8_SRGB
|
10, // ASTC_2D_10X8_SRGB
|
||||||
6, // ASTC_2D_6X6_UNORM
|
6, // ASTC_2D_6X6_UNORM
|
||||||
6, // ASTC_2D_6X6_SRGB
|
6, // ASTC_2D_6X6_SRGB
|
||||||
|
10, // ASTC_2D_10X6_UNORM
|
||||||
10, // ASTC_2D_10X10_UNORM
|
10, // ASTC_2D_10X10_UNORM
|
||||||
10, // ASTC_2D_10X10_SRGB
|
10, // ASTC_2D_10X10_SRGB
|
||||||
12, // ASTC_2D_12X12_UNORM
|
12, // ASTC_2D_12X12_UNORM
|
||||||
|
@ -329,6 +331,7 @@ constexpr std::array<u8, MaxPixelFormat> BLOCK_HEIGHT_TABLE = {{
|
||||||
8, // ASTC_2D_10X8_SRGB
|
8, // ASTC_2D_10X8_SRGB
|
||||||
6, // ASTC_2D_6X6_UNORM
|
6, // ASTC_2D_6X6_UNORM
|
||||||
6, // ASTC_2D_6X6_SRGB
|
6, // ASTC_2D_6X6_SRGB
|
||||||
|
6, // ASTC_2D_10X6_UNORM
|
||||||
10, // ASTC_2D_10X10_UNORM
|
10, // ASTC_2D_10X10_UNORM
|
||||||
10, // ASTC_2D_10X10_SRGB
|
10, // ASTC_2D_10X10_SRGB
|
||||||
12, // ASTC_2D_12X12_UNORM
|
12, // ASTC_2D_12X12_UNORM
|
||||||
|
@ -431,6 +434,7 @@ constexpr std::array<u8, MaxPixelFormat> BITS_PER_BLOCK_TABLE = {{
|
||||||
128, // ASTC_2D_10X8_SRGB
|
128, // ASTC_2D_10X8_SRGB
|
||||||
128, // ASTC_2D_6X6_UNORM
|
128, // ASTC_2D_6X6_UNORM
|
||||||
128, // ASTC_2D_6X6_SRGB
|
128, // ASTC_2D_6X6_SRGB
|
||||||
|
128, // ASTC_2D_10X6_UNORM
|
||||||
128, // ASTC_2D_10X10_UNORM
|
128, // ASTC_2D_10X10_UNORM
|
||||||
128, // ASTC_2D_10X10_SRGB
|
128, // ASTC_2D_10X10_SRGB
|
||||||
128, // ASTC_2D_12X12_UNORM
|
128, // ASTC_2D_12X12_UNORM
|
||||||
|
|
|
@ -206,6 +206,8 @@ PixelFormat PixelFormatFromTextureInfo(TextureFormat format, ComponentType red,
|
||||||
return PixelFormat::ASTC_2D_6X6_UNORM;
|
return PixelFormat::ASTC_2D_6X6_UNORM;
|
||||||
case Hash(TextureFormat::ASTC_2D_6X6, UNORM, SRGB):
|
case Hash(TextureFormat::ASTC_2D_6X6, UNORM, SRGB):
|
||||||
return PixelFormat::ASTC_2D_6X6_SRGB;
|
return PixelFormat::ASTC_2D_6X6_SRGB;
|
||||||
|
case Hash(TextureFormat::ASTC_2D_10X6, UNORM, LINEAR):
|
||||||
|
return PixelFormat::ASTC_2D_10X6_UNORM;
|
||||||
case Hash(TextureFormat::ASTC_2D_10X10, UNORM, LINEAR):
|
case Hash(TextureFormat::ASTC_2D_10X10, UNORM, LINEAR):
|
||||||
return PixelFormat::ASTC_2D_10X10_UNORM;
|
return PixelFormat::ASTC_2D_10X10_UNORM;
|
||||||
case Hash(TextureFormat::ASTC_2D_10X10, UNORM, SRGB):
|
case Hash(TextureFormat::ASTC_2D_10X10, UNORM, SRGB):
|
||||||
|
|
|
@ -175,6 +175,8 @@ struct fmt::formatter<VideoCore::Surface::PixelFormat> : fmt::formatter<fmt::str
|
||||||
return "ASTC_2D_6X6_UNORM";
|
return "ASTC_2D_6X6_UNORM";
|
||||||
case PixelFormat::ASTC_2D_6X6_SRGB:
|
case PixelFormat::ASTC_2D_6X6_SRGB:
|
||||||
return "ASTC_2D_6X6_SRGB";
|
return "ASTC_2D_6X6_SRGB";
|
||||||
|
case PixelFormat::ASTC_2D_10X6_UNORM:
|
||||||
|
return "ASTC_2D_10X6_UNORM";
|
||||||
case PixelFormat::ASTC_2D_10X10_UNORM:
|
case PixelFormat::ASTC_2D_10X10_UNORM:
|
||||||
return "ASTC_2D_10X10_UNORM";
|
return "ASTC_2D_10X10_UNORM";
|
||||||
case PixelFormat::ASTC_2D_10X10_SRGB:
|
case PixelFormat::ASTC_2D_10X10_SRGB:
|
||||||
|
|
Loading…
Reference in a new issue