mirror of
https://github.com/pineappleEA/pineapple-src.git
synced 2024-11-25 02:58:24 -05:00
early-access version 3305
This commit is contained in:
parent
558ae3ccbe
commit
d1f91fffe7
@ -1,7 +1,7 @@
|
||||
yuzu emulator early access
|
||||
=============
|
||||
|
||||
This is the source code for early-access 3304.
|
||||
This is the source code for early-access 3305.
|
||||
|
||||
## Legal Notice
|
||||
|
||||
|
@ -298,9 +298,25 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR
|
||||
const vk::InstanceDispatch& dld_)
|
||||
: instance{instance_}, dld{dld_}, physical{physical_},
|
||||
format_properties(GetFormatProperties(physical)) {
|
||||
if (!GetSuitability(surface != nullptr)) {
|
||||
// Get suitability and device properties.
|
||||
const bool is_suitable = GetSuitability(surface != nullptr);
|
||||
|
||||
const VkDriverId driver_id = properties.driver.driverID;
|
||||
const bool is_radv = driver_id == VK_DRIVER_ID_MESA_RADV;
|
||||
const bool is_amd_driver =
|
||||
driver_id == VK_DRIVER_ID_AMD_PROPRIETARY || driver_id == VK_DRIVER_ID_AMD_OPEN_SOURCE;
|
||||
const bool is_amd = is_amd_driver || is_radv;
|
||||
const bool is_intel_windows = driver_id == VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS;
|
||||
const bool is_intel_anv = driver_id == VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA;
|
||||
const bool is_nvidia = driver_id == VK_DRIVER_ID_NVIDIA_PROPRIETARY;
|
||||
const bool is_mvk = driver_id == VK_DRIVER_ID_MOLTENVK;
|
||||
|
||||
if (is_mvk && !is_suitable) {
|
||||
LOG_WARNING(Render_Vulkan, "Unsuitable driver is MoltenVK, continuing anyway");
|
||||
} else if (!is_suitable) {
|
||||
throw vk::Exception(VK_ERROR_INCOMPATIBLE_DRIVER);
|
||||
}
|
||||
|
||||
SetupFamilies(surface);
|
||||
const auto queue_cis = GetDeviceQueueCreateInfos();
|
||||
|
||||
@ -339,15 +355,6 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR
|
||||
CollectPhysicalMemoryInfo();
|
||||
CollectToolingInfo();
|
||||
|
||||
const VkDriverId driver_id = properties.driver.driverID;
|
||||
const bool is_radv = driver_id == VK_DRIVER_ID_MESA_RADV;
|
||||
const bool is_amd_driver =
|
||||
driver_id == VK_DRIVER_ID_AMD_PROPRIETARY || driver_id == VK_DRIVER_ID_AMD_OPEN_SOURCE;
|
||||
const bool is_amd = is_amd_driver || is_radv;
|
||||
const bool is_intel_windows = driver_id == VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS;
|
||||
const bool is_intel_anv = driver_id == VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA;
|
||||
const bool is_nvidia = driver_id == VK_DRIVER_ID_NVIDIA_PROPRIETARY;
|
||||
|
||||
if (is_nvidia) {
|
||||
const u32 nv_major_version = (properties.properties.driverVersion >> 22) & 0x3ff;
|
||||
const auto arch = GetNvidiaArchitecture(physical, supported_extensions);
|
||||
@ -449,6 +456,14 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR
|
||||
LOG_WARNING(Render_Vulkan, "ANV driver does not support native BGR format");
|
||||
must_emulate_bgr565 = true;
|
||||
}
|
||||
if (is_mvk) {
|
||||
LOG_WARNING(Render_Vulkan,
|
||||
"MVK driver breaks when using more than 16 vertex attributes/bindings");
|
||||
properties.properties.limits.maxVertexInputAttributes =
|
||||
std::min(properties.properties.limits.maxVertexInputAttributes, 16U);
|
||||
properties.properties.limits.maxVertexInputBindings =
|
||||
std::min(properties.properties.limits.maxVertexInputBindings, 16U);
|
||||
}
|
||||
|
||||
logical = vk::Device::Create(physical, queue_cis, ExtensionListForVulkan(loaded_extensions),
|
||||
first_next, dld);
|
||||
|
@ -96,9 +96,9 @@ void EmuThread::run() {
|
||||
m_is_running.store(false);
|
||||
m_is_running.notify_all();
|
||||
|
||||
emit DebugModeEntered();
|
||||
EmulationPaused(lk);
|
||||
Common::CondvarWait(m_should_run_cv, lk, stop_token, [&] { return m_should_run; });
|
||||
emit DebugModeLeft();
|
||||
EmulationResumed(lk);
|
||||
}
|
||||
}
|
||||
|
||||
@ -111,6 +111,21 @@ void EmuThread::run() {
|
||||
#endif
|
||||
}
|
||||
|
||||
// Unlock while emitting signals so that the main thread can
|
||||
// continue pumping events.
|
||||
|
||||
void EmuThread::EmulationPaused(std::unique_lock<std::mutex>& lk) {
|
||||
lk.unlock();
|
||||
emit DebugModeEntered();
|
||||
lk.lock();
|
||||
}
|
||||
|
||||
void EmuThread::EmulationResumed(std::unique_lock<std::mutex>& lk) {
|
||||
lk.unlock();
|
||||
emit DebugModeLeft();
|
||||
lk.lock();
|
||||
}
|
||||
|
||||
#ifdef HAS_OPENGL
|
||||
class OpenGLSharedContext : public Core::Frontend::GraphicsContext {
|
||||
public:
|
||||
|
@ -91,6 +91,10 @@ public:
|
||||
m_stop_source.request_stop();
|
||||
}
|
||||
|
||||
private:
|
||||
void EmulationPaused(std::unique_lock<std::mutex>& lk);
|
||||
void EmulationResumed(std::unique_lock<std::mutex>& lk);
|
||||
|
||||
private:
|
||||
Core::System& m_system;
|
||||
|
||||
|
@ -22,6 +22,7 @@ ConfigureGraphicsAdvanced::~ConfigureGraphicsAdvanced() = default;
|
||||
void ConfigureGraphicsAdvanced::SetConfiguration() {
|
||||
const bool runtime_lock = !system.IsPoweredOn();
|
||||
ui->use_vsync->setEnabled(runtime_lock);
|
||||
ui->renderer_force_max_clock->setEnabled(runtime_lock);
|
||||
ui->use_asynchronous_shaders->setEnabled(runtime_lock);
|
||||
ui->anisotropic_filtering_combobox->setEnabled(runtime_lock);
|
||||
|
||||
@ -40,12 +41,12 @@ void ConfigureGraphicsAdvanced::SetConfiguration() {
|
||||
Settings::values.max_anisotropy.GetValue());
|
||||
} else {
|
||||
ConfigurationShared::SetPerGameSetting(ui->gpu_accuracy, &Settings::values.gpu_accuracy);
|
||||
ConfigurationShared::SetPerGameSetting(ui->renderer_force_max_clock,
|
||||
&Settings::values.renderer_force_max_clock);
|
||||
ConfigurationShared::SetPerGameSetting(ui->anisotropic_filtering_combobox,
|
||||
&Settings::values.max_anisotropy);
|
||||
ConfigurationShared::SetHighlight(ui->label_gpu_accuracy,
|
||||
!Settings::values.gpu_accuracy.UsingGlobal());
|
||||
ConfigurationShared::SetHighlight(ui->renderer_force_max_clock,
|
||||
!Settings::values.renderer_force_max_clock.UsingGlobal());
|
||||
ConfigurationShared::SetHighlight(ui->af_label,
|
||||
!Settings::values.max_anisotropy.UsingGlobal());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user