Compare commits

...

4 Commits

Author SHA1 Message Date
Jordan Woyak
4506c8b4f5
Merge 1888770256 into 80ea68b13c 2024-11-11 07:10:33 -05:00
JMC47
80ea68b13c
Merge pull request #13183 from Tilka/sync_on_fifo_reset
ProcessorInterface: sync GPU just before PI_FIFO_RESET
2024-11-11 00:38:26 -05:00
Tillmann Karras
fbce737415 ProcessorInterface: sync GPU just before PI_FIFO_RESET
GXAbortFrame() is problematic for Dolphin because it first writes
PI_FIFO_RESET (for which we discard our internal fifo), then disables CP
reads (for which we execute pending commands in the GP fifo in emulated
memory). I don't know whether there is a race condition on hardware, but
there is one for us. Avoid this by also doing a GPU sync here.
2024-11-09 03:29:05 +00:00
Jordan Woyak
1888770256 DolphinQt: Display more user-friendly names in the mapping window device list. 2024-11-05 17:50:05 -06:00
2 changed files with 26 additions and 4 deletions

View File

@ -98,6 +98,10 @@ void ProcessorInterfaceManager::RegisterMMIO(MMIO::Mapping* mmio, u32 base)
{
system.GetGPFifo().ResetGatherPipe();
// Assume that all bytes that made it into the GPU fifo did in fact execute
// before this MMIO write takes effect.
system.GetFifo().SyncGPUForRegisterAccess();
// Call Fifo::ResetVideoBuffer() from the video thread. Since that function
// resets various pointers used by the video thread, we can't call it directly
// from the CPU thread, so queue a task to do it instead. In single-core mode,

View File

@ -59,6 +59,22 @@
#include "InputCommon/ControllerInterface/CoreDevice.h"
#include "InputCommon/InputConfig.h"
namespace
{
QString GetUserFriendlyDeviceName(const std::string& str)
{
ciface::Core::DeviceQualifier qualifier;
qualifier.FromString(str);
return QStringLiteral("%1 (%2) %3")
.arg(QString::fromStdString(qualifier.name))
.arg(qualifier.cid + 1)
.arg(QString::fromStdString(qualifier.source));
}
} // namespace
MappingWindow::MappingWindow(QWidget* parent, Type type, int port_num)
: QDialog(parent), m_port(port_num)
{
@ -363,8 +379,9 @@ void MappingWindow::OnGlobalDevicesChanged()
for (const auto& name : g_controller_interface.GetAllDeviceStrings())
{
const auto display_name = GetUserFriendlyDeviceName(name);
const auto qname = QString::fromStdString(name);
m_devices_combo->addItem(qname, qname);
m_devices_combo->addItem(display_name, qname);
}
const auto default_device = m_controller->GetDefaultDevice().ToString();
@ -372,7 +389,7 @@ void MappingWindow::OnGlobalDevicesChanged()
if (!default_device.empty())
{
const auto default_device_index =
m_devices_combo->findText(QString::fromStdString(default_device));
m_devices_combo->findData(QString::fromStdString(default_device));
if (default_device_index != -1)
{
@ -382,9 +399,10 @@ void MappingWindow::OnGlobalDevicesChanged()
{
// Selected device is not currently attached.
m_devices_combo->insertSeparator(m_devices_combo->count());
const auto display_name = GetUserFriendlyDeviceName(default_device);
const auto qname = QString::fromStdString(default_device);
m_devices_combo->addItem(QLatin1Char{'['} + tr("disconnected") + QStringLiteral("] ") + qname,
qname);
m_devices_combo->addItem(
QLatin1Char{'['} + tr("disconnected") + QStringLiteral("] ") + display_name, qname);
m_devices_combo->setCurrentIndex(m_devices_combo->count() - 1);
}
}