Compare commits
17 Commits
android-24
...
android-26
Author | SHA1 | Date | |
---|---|---|---|
2d33cd1c3f | |||
2a9eab5e1b | |||
083fb8a15f | |||
06fa13a014 | |||
1ed6e3e51d | |||
e2623d64de | |||
0f37756a3a | |||
ed3f9bab11 | |||
deafa92122 | |||
c6458970ad | |||
eaf2ab5289 | |||
a4a106bb25 | |||
f4e5d07619 | |||
70f37be9b9 | |||
36d48cef50 | |||
bb4e676155 | |||
8c2411da29 |
@ -1,3 +1,11 @@
|
||||
| Pull Request | Commit | Title | Author | Merged? |
|
||||
|----|----|----|----|----|
|
||||
|
||||
|
||||
End of merge log. You can find the original README.md below the break.
|
||||
|
||||
-----
|
||||
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2018 yuzu Emulator Project
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
@ -32,16 +32,16 @@ struct AudioRendererParameterInternal {
|
||||
/* 0x14 */ u32 sinks;
|
||||
/* 0x18 */ u32 effects;
|
||||
/* 0x1C */ u32 perf_frames;
|
||||
/* 0x20 */ u16 voice_drop_enabled;
|
||||
/* 0x20 */ u8 voice_drop_enabled;
|
||||
/* 0x21 */ u8 unk_21;
|
||||
/* 0x22 */ u8 rendering_device;
|
||||
/* 0x23 */ ExecutionMode execution_mode;
|
||||
/* 0x24 */ u32 splitter_infos;
|
||||
/* 0x28 */ s32 splitter_destinations;
|
||||
/* 0x2C */ u32 external_context_size;
|
||||
/* 0x30 */ u32 revision;
|
||||
/* 0x34 */ char unk34[0x4];
|
||||
};
|
||||
static_assert(sizeof(AudioRendererParameterInternal) == 0x38,
|
||||
static_assert(sizeof(AudioRendererParameterInternal) == 0x34,
|
||||
"AudioRendererParameterInternal has the wrong size!");
|
||||
|
||||
/**
|
||||
|
@ -56,12 +56,12 @@ std::unique_ptr<WallClock> CreateOptimalClock() {
|
||||
#ifdef ARCHITECTURE_x86_64
|
||||
const auto& caps = GetCPUCaps();
|
||||
|
||||
if (caps.invariant_tsc && caps.tsc_frequency >= WallClock::GPUTickFreq) {
|
||||
if (caps.invariant_tsc && caps.tsc_frequency >= std::nano::den) {
|
||||
return std::make_unique<X64::NativeClock>(caps.tsc_frequency);
|
||||
} else {
|
||||
// Fallback to StandardWallClock if the hardware TSC
|
||||
// - Is not invariant
|
||||
// - Is not more precise than GPUTickFreq
|
||||
// - Is not more precise than 1 GHz (1ns resolution)
|
||||
return std::make_unique<StandardWallClock>();
|
||||
}
|
||||
#else
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
#include <chrono>
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
|
||||
#include "common/logging/log.h"
|
||||
#include "common/settings.h"
|
||||
@ -46,14 +47,14 @@ static FileSys::VirtualDir GetTimeZoneBinary(Core::System& system) {
|
||||
return FileSys::ExtractRomFS(romfs);
|
||||
}
|
||||
|
||||
static std::vector<std::string> BuildLocationNameCache(Core::System& system) {
|
||||
const FileSys::VirtualDir extracted_romfs{GetTimeZoneBinary(system)};
|
||||
if (!extracted_romfs) {
|
||||
static std::vector<std::string> BuildLocationNameCache(
|
||||
const FileSys::VirtualDir& time_zone_binary) {
|
||||
if (!time_zone_binary) {
|
||||
LOG_ERROR(Service_Time, "Failed to extract RomFS for {:016X}!", time_zone_binary_titleid);
|
||||
return {};
|
||||
}
|
||||
|
||||
const FileSys::VirtualFile binary_list{extracted_romfs->GetFile("binaryList.txt")};
|
||||
const FileSys::VirtualFile binary_list{time_zone_binary->GetFile("binaryList.txt")};
|
||||
if (!binary_list) {
|
||||
LOG_ERROR(Service_Time, "{:016X} has no file binaryList.txt!", time_zone_binary_titleid);
|
||||
return {};
|
||||
@ -73,7 +74,8 @@ static std::vector<std::string> BuildLocationNameCache(Core::System& system) {
|
||||
}
|
||||
|
||||
TimeZoneContentManager::TimeZoneContentManager(Core::System& system_)
|
||||
: system{system_}, location_name_cache{BuildLocationNameCache(system)} {}
|
||||
: system{system_}, time_zone_binary{GetTimeZoneBinary(system)},
|
||||
location_name_cache{BuildLocationNameCache(time_zone_binary)} {}
|
||||
|
||||
void TimeZoneContentManager::Initialize(TimeManager& time_manager) {
|
||||
const auto timezone_setting = Settings::GetTimeZoneString();
|
||||
@ -111,13 +113,12 @@ Result TimeZoneContentManager::GetTimeZoneInfoFile(const std::string& location_n
|
||||
return ERROR_TIME_NOT_FOUND;
|
||||
}
|
||||
|
||||
const FileSys::VirtualDir extracted_romfs{GetTimeZoneBinary(system)};
|
||||
if (!extracted_romfs) {
|
||||
if (!time_zone_binary) {
|
||||
LOG_ERROR(Service_Time, "Failed to extract RomFS for {:016X}!", time_zone_binary_titleid);
|
||||
return ERROR_TIME_NOT_FOUND;
|
||||
}
|
||||
|
||||
const FileSys::VirtualDir zoneinfo_dir{extracted_romfs->GetSubdirectory("zoneinfo")};
|
||||
const FileSys::VirtualDir zoneinfo_dir{time_zone_binary->GetSubdirectory("zoneinfo")};
|
||||
if (!zoneinfo_dir) {
|
||||
LOG_ERROR(Service_Time, "{:016X} has no directory zoneinfo!", time_zone_binary_titleid);
|
||||
return ERROR_TIME_NOT_FOUND;
|
||||
|
@ -6,6 +6,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "core/file_sys/vfs_types.h"
|
||||
#include "core/hle/service/time/time_zone_manager.h"
|
||||
|
||||
namespace Core {
|
||||
@ -41,6 +42,7 @@ private:
|
||||
|
||||
Core::System& system;
|
||||
TimeZoneManager time_zone_manager;
|
||||
const FileSys::VirtualDir time_zone_binary;
|
||||
const std::vector<std::string> location_name_cache;
|
||||
};
|
||||
|
||||
|
@ -275,6 +275,8 @@ add_library(video_core STATIC
|
||||
vulkan_common/nsight_aftermath_tracker.cpp
|
||||
vulkan_common/nsight_aftermath_tracker.h
|
||||
vulkan_common/vma.cpp
|
||||
vulkan_common/vma.h
|
||||
vulkan_common/vulkan.h
|
||||
)
|
||||
|
||||
create_target_directory_groups(video_core)
|
||||
|
@ -566,7 +566,7 @@ void BlitScreen::CreateDescriptorPool() {
|
||||
const VkDescriptorPoolCreateInfo ci{
|
||||
.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO,
|
||||
.pNext = nullptr,
|
||||
.flags = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT,
|
||||
.flags = 0,
|
||||
.maxSets = static_cast<u32>(image_count),
|
||||
.poolSizeCount = static_cast<u32>(pool_sizes.size()),
|
||||
.pPoolSizes = pool_sizes.data(),
|
||||
@ -576,7 +576,7 @@ void BlitScreen::CreateDescriptorPool() {
|
||||
const VkDescriptorPoolCreateInfo ci_aa{
|
||||
.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO,
|
||||
.pNext = nullptr,
|
||||
.flags = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT,
|
||||
.flags = 0,
|
||||
.maxSets = static_cast<u32>(image_count),
|
||||
.poolSizeCount = static_cast<u32>(pool_sizes_aa.size()),
|
||||
.pPoolSizes = pool_sizes_aa.data(),
|
||||
|
@ -77,7 +77,7 @@ static void AllocatePool(const Device& device, DescriptorBank& bank) {
|
||||
bank.pools.push_back(device.GetLogical().CreateDescriptorPool({
|
||||
.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO,
|
||||
.pNext = nullptr,
|
||||
.flags = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT,
|
||||
.flags = 0,
|
||||
.maxSets = sets_per_pool,
|
||||
.poolSizeCount = static_cast<u32>(pool_cursor),
|
||||
.pPoolSizes = std::data(pool_sizes),
|
||||
|
@ -150,7 +150,7 @@ void FSR::CreateDescriptorPool() {
|
||||
const VkDescriptorPoolCreateInfo ci{
|
||||
.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO,
|
||||
.pNext = nullptr,
|
||||
.flags = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT,
|
||||
.flags = 0,
|
||||
.maxSets = static_cast<u32>(image_count * 2),
|
||||
.poolSizeCount = static_cast<u32>(pool_sizes.size()),
|
||||
.pPoolSizes = pool_sizes.data(),
|
||||
|
@ -62,7 +62,7 @@ void TurboMode::Run(std::stop_token stop_token) {
|
||||
auto descriptor_pool = dld.CreateDescriptorPool(VkDescriptorPoolCreateInfo{
|
||||
.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO,
|
||||
.pNext = nullptr,
|
||||
.flags = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT,
|
||||
.flags = 0,
|
||||
.maxSets = 1,
|
||||
.poolSizeCount = 1,
|
||||
.pPoolSizes = &pool_size,
|
||||
|
@ -2,7 +2,5 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#define VMA_IMPLEMENTATION
|
||||
#define VMA_STATIC_VULKAN_FUNCTIONS 0
|
||||
#define VMA_DYNAMIC_VULKAN_FUNCTIONS 1
|
||||
|
||||
#include <vk_mem_alloc.h>
|
||||
#include "video_core/vulkan_common/vma.h"
|
||||
|
11
src/video_core/vulkan_common/vma.h
Normal file
11
src/video_core/vulkan_common/vma.h
Normal file
@ -0,0 +1,11 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "video_core/vulkan_common/vulkan.h"
|
||||
|
||||
#define VMA_STATIC_VULKAN_FUNCTIONS 0
|
||||
#define VMA_DYNAMIC_VULKAN_FUNCTIONS 1
|
||||
|
||||
#include <vk_mem_alloc.h>
|
13
src/video_core/vulkan_common/vulkan.h
Normal file
13
src/video_core/vulkan_common/vulkan.h
Normal file
@ -0,0 +1,13 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#define VK_NO_PROTOTYPES
|
||||
#ifdef _WIN32
|
||||
#define VK_USE_PLATFORM_WIN32_KHR
|
||||
#elif defined(__APPLE__)
|
||||
#define VK_USE_PLATFORM_METAL_EXT
|
||||
#endif
|
||||
|
||||
#include <vulkan/vulkan.h>
|
@ -15,6 +15,7 @@
|
||||
#include "common/polyfill_ranges.h"
|
||||
#include "common/settings.h"
|
||||
#include "video_core/vulkan_common/nsight_aftermath_tracker.h"
|
||||
#include "video_core/vulkan_common/vma.h"
|
||||
#include "video_core/vulkan_common/vulkan_device.h"
|
||||
#include "video_core/vulkan_common/vulkan_wrapper.h"
|
||||
|
||||
@ -22,8 +23,6 @@
|
||||
#include <adrenotools/bcenabler.h>
|
||||
#endif
|
||||
|
||||
#include <vk_mem_alloc.h>
|
||||
|
||||
namespace Vulkan {
|
||||
using namespace Common::Literals;
|
||||
namespace {
|
||||
@ -554,6 +553,14 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR
|
||||
}
|
||||
|
||||
sets_per_pool = 64;
|
||||
if (extensions.extended_dynamic_state3 && is_amd_driver &&
|
||||
!features.shader_float16_int8.shaderFloat16 &&
|
||||
properties.properties.driverVersion >= VK_MAKE_API_VERSION(0, 2, 0, 258)) {
|
||||
LOG_WARNING(Render_Vulkan, "AMD GCN4 has broken extendedDynamicState3ColorBlendEquation");
|
||||
features.extended_dynamic_state3.extendedDynamicState3ColorBlendEnable = false;
|
||||
features.extended_dynamic_state3.extendedDynamicState3ColorBlendEquation = false;
|
||||
dynamic_state3_blending = false;
|
||||
}
|
||||
if (is_amd_driver) {
|
||||
// AMD drivers need a higher amount of Sets per Pool in certain circumstances like in XC2.
|
||||
sets_per_pool = 96;
|
||||
|
@ -11,12 +11,11 @@
|
||||
#include "common/common_types.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "common/polyfill_ranges.h"
|
||||
#include "video_core/vulkan_common/vma.h"
|
||||
#include "video_core/vulkan_common/vulkan_device.h"
|
||||
#include "video_core/vulkan_common/vulkan_memory_allocator.h"
|
||||
#include "video_core/vulkan_common/vulkan_wrapper.h"
|
||||
|
||||
#include <vk_mem_alloc.h>
|
||||
|
||||
namespace Vulkan {
|
||||
namespace {
|
||||
struct Range {
|
||||
|
@ -9,11 +9,9 @@
|
||||
|
||||
#include "common/common_types.h"
|
||||
#include "common/logging/log.h"
|
||||
|
||||
#include "video_core/vulkan_common/vma.h"
|
||||
#include "video_core/vulkan_common/vulkan_wrapper.h"
|
||||
|
||||
#include <vk_mem_alloc.h>
|
||||
|
||||
namespace Vulkan::vk {
|
||||
|
||||
namespace {
|
||||
|
@ -12,13 +12,8 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#define VK_NO_PROTOTYPES
|
||||
#ifdef _WIN32
|
||||
#define VK_USE_PLATFORM_WIN32_KHR
|
||||
#elif defined(__APPLE__)
|
||||
#define VK_USE_PLATFORM_METAL_EXT
|
||||
#endif
|
||||
#include <vulkan/vulkan.h>
|
||||
#include "common/common_types.h"
|
||||
#include "video_core/vulkan_common/vulkan.h"
|
||||
|
||||
// Sanitize macros
|
||||
#ifdef CreateEvent
|
||||
@ -28,8 +23,6 @@
|
||||
#undef CreateSemaphore
|
||||
#endif
|
||||
|
||||
#include "common/common_types.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable : 26812) // Disable prefer enum class over enum
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user