Compare commits
3 Commits
b0d3f3d5e4
...
ae86c03db0
Author | SHA1 | Date |
---|---|---|
Margen67 | ae86c03db0 | |
Adrian | 2385cc53a9 | |
Margen67 | af4dabe8b4 |
|
@ -226,7 +226,6 @@ class EmulatorWindow {
|
|||
void GamepadHotKeys();
|
||||
void ToggleGPUSetting(gpu_cvar index);
|
||||
bool IsUseNexusForGameBarEnabled();
|
||||
std::string BoolToString(bool value);
|
||||
void DisplayHotKeysConfig();
|
||||
|
||||
void RunPreviouslyPlayedTitle();
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
#include "xenia/cpu/cpu_flags.h"
|
||||
|
||||
DEFINE_string(cpu, "any", "CPU backend [any, x64].", "CPU");
|
||||
DEFINE_string(cpu, "any", "Does nothing. CPU backend [any, x64].", "CPU");
|
||||
|
||||
DEFINE_string(
|
||||
load_module_map, "",
|
||||
|
@ -31,6 +31,7 @@ DEFINE_bool(trace_function_data, false,
|
|||
"Generate tracing for function result data.", "CPU");
|
||||
|
||||
DEFINE_bool(validate_hir, false,
|
||||
"Only does anything on debug builds. "
|
||||
"Perform validation checks on the HIR during compilation.", "CPU");
|
||||
|
||||
DEFINE_uint64(
|
||||
|
|
|
@ -45,7 +45,12 @@ PPCTranslator::PPCTranslator(PPCFrontend* frontend) : frontend_(frontend) {
|
|||
assembler_ = backend->CreateAssembler();
|
||||
assembler_->Initialize();
|
||||
|
||||
bool validate = cvars::validate_hir;
|
||||
bool validate =
|
||||
#ifdef DEBUG
|
||||
cvars::validate_hir;
|
||||
#else
|
||||
0;
|
||||
#endif
|
||||
|
||||
// Merge blocks early. This will let us use more context in other passes.
|
||||
// The CFG is required for simplification and dirtied by it.
|
||||
|
|
|
@ -336,7 +336,7 @@ const std::unique_ptr<vfs::Device> Emulator::CreateVfsDeviceBasedOnPath(
|
|||
xe::ShowSimpleMessageBox(
|
||||
xe::SimpleMessageBoxType::Error,
|
||||
fmt::format(
|
||||
"Unsupported format!"
|
||||
"Unsupported format!\n"
|
||||
"Xenia does not support running software in an archived format."));
|
||||
}
|
||||
return std::make_unique<vfs::DiscImageDevice>(mount_path, path);
|
||||
|
@ -387,15 +387,15 @@ void Emulator::SetPersistentEmulatorFlags(uint64_t new_flags) {
|
|||
X_STATUS Emulator::MountPath(const std::filesystem::path& path,
|
||||
const std::string_view mount_path) {
|
||||
auto device = CreateVfsDeviceBasedOnPath(path, mount_path);
|
||||
if (!device->Initialize()) {
|
||||
xe::FatalError(
|
||||
if (!device || !device->Initialize()) {
|
||||
XELOGE(
|
||||
"Unable to mount the selected file, it is an unsupported format or "
|
||||
"corrupted.");
|
||||
return X_STATUS_NO_SUCH_FILE;
|
||||
}
|
||||
if (!file_system_->RegisterDevice(std::move(device))) {
|
||||
xe::FatalError(fmt::format("Unable to register the input file to {}.",
|
||||
xe::path_to_utf8(mount_path)));
|
||||
XELOGE("Unable to register the input file to {}.",
|
||||
xe::path_to_utf8(mount_path));
|
||||
return X_STATUS_NO_SUCH_FILE;
|
||||
}
|
||||
|
||||
|
@ -413,24 +413,27 @@ X_STATUS Emulator::MountPath(const std::filesystem::path& path,
|
|||
X_STATUS Emulator::LaunchPath(const std::filesystem::path& path) {
|
||||
// Launch based on file type.
|
||||
// This is a silly guess based on file extension.
|
||||
|
||||
X_STATUS mount_result = X_STATUS_SUCCESS;
|
||||
|
||||
if (!path.has_extension()) {
|
||||
// Likely an STFS container.
|
||||
MountPath(path, "\\Device\\Cdrom0");
|
||||
return LaunchStfsContainer(path);
|
||||
mount_result = MountPath(path, "\\Device\\Cdrom0");
|
||||
return mount_result ? mount_result : LaunchStfsContainer(path);
|
||||
};
|
||||
auto extension = xe::utf8::lower_ascii(xe::path_to_utf8(path.extension()));
|
||||
if (extension == ".xex" || extension == ".elf" || extension == ".exe") {
|
||||
// Treat as a naked xex file.
|
||||
MountPath(path, "\\Device\\Harddisk0\\Partition1");
|
||||
return LaunchXexFile(path);
|
||||
mount_result = MountPath(path, "\\Device\\Harddisk0\\Partition1");
|
||||
return mount_result ? mount_result : LaunchXexFile(path);
|
||||
} else if (extension == ".zar") {
|
||||
// Assume a disc image.
|
||||
MountPath(path, "\\Device\\Cdrom0");
|
||||
return LaunchDiscArchive(path);
|
||||
mount_result = MountPath(path, "\\Device\\Cdrom0");
|
||||
return mount_result ? mount_result : LaunchDiscArchive(path);
|
||||
} else {
|
||||
// Assume a disc image.
|
||||
MountPath(path, "\\Device\\Cdrom0");
|
||||
return LaunchDiscImage(path);
|
||||
mount_result = MountPath(path, "\\Device\\Cdrom0");
|
||||
return mount_result ? mount_result : LaunchDiscImage(path);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -495,7 +498,7 @@ X_STATUS Emulator::LaunchDefaultModule(const std::filesystem::path& path) {
|
|||
X_STATUS Emulator::InstallContentPackage(const std::filesystem::path& path) {
|
||||
std::unique_ptr<vfs::Device> device =
|
||||
vfs::XContentContainerDevice::CreateContentDevice("", path);
|
||||
if (!device->Initialize()) {
|
||||
if (!device || !device->Initialize()) {
|
||||
XELOGE("Failed to initialize device");
|
||||
return X_STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
|
|
|
@ -447,7 +447,9 @@ bool D3D12RenderTargetCache::Initialize() {
|
|||
// Using the cvar on emulator initialization so used pipelines are consistent
|
||||
// across different titles launched in one emulator instance.
|
||||
use_stencil_reference_output_ =
|
||||
#ifdef DEBUG
|
||||
cvars::native_stencil_value_output &&
|
||||
#endif
|
||||
provider.IsPSSpecifiedStencilReferenceSupported() &&
|
||||
(cvars::native_stencil_value_output_d3d12_intel ||
|
||||
provider.GetAdapterVendorID() !=
|
||||
|
@ -464,6 +466,7 @@ bool D3D12RenderTargetCache::Initialize() {
|
|||
|
||||
// Check if 2x MSAA is supported or needs to be emulated with 4x MSAA
|
||||
// instead.
|
||||
#ifdef DEBUG
|
||||
if (cvars::native_2x_msaa) {
|
||||
msaa_2x_supported_ = true;
|
||||
static const DXGI_FORMAT kRenderTargetDXGIFormats[] = {
|
||||
|
@ -502,6 +505,42 @@ bool D3D12RenderTargetCache::Initialize() {
|
|||
} else {
|
||||
msaa_2x_supported_ = false;
|
||||
}
|
||||
#else // DEBUG
|
||||
msaa_2x_supported_ = true;
|
||||
static const DXGI_FORMAT kRenderTargetDXGIFormats[] = {
|
||||
DXGI_FORMAT_R16G16B16A16_FLOAT,
|
||||
DXGI_FORMAT_R16G16B16A16_SNORM,
|
||||
DXGI_FORMAT_R32G32_FLOAT,
|
||||
DXGI_FORMAT_D32_FLOAT_S8X24_UINT,
|
||||
DXGI_FORMAT_R10G10B10A2_UNORM,
|
||||
DXGI_FORMAT_R8G8B8A8_UNORM,
|
||||
DXGI_FORMAT_R16G16_FLOAT,
|
||||
DXGI_FORMAT_R16G16_SNORM,
|
||||
DXGI_FORMAT_R32_FLOAT,
|
||||
DXGI_FORMAT_D24_UNORM_S8_UINT,
|
||||
// For ownership transfer.
|
||||
DXGI_FORMAT_R16G16B16A16_UINT,
|
||||
DXGI_FORMAT_R32G32_UINT,
|
||||
DXGI_FORMAT_R16G16_UINT,
|
||||
DXGI_FORMAT_R32_UINT,
|
||||
};
|
||||
D3D12_FEATURE_DATA_MULTISAMPLE_QUALITY_LEVELS multisample_quality_levels;
|
||||
multisample_quality_levels.SampleCount = 2;
|
||||
multisample_quality_levels.Flags =
|
||||
D3D12_MULTISAMPLE_QUALITY_LEVELS_FLAG_NONE;
|
||||
for (size_t i = 0; i < xe::countof(kRenderTargetDXGIFormats); ++i) {
|
||||
multisample_quality_levels.Format = kRenderTargetDXGIFormats[i];
|
||||
multisample_quality_levels.NumQualityLevels = 0;
|
||||
if (FAILED(device->CheckFeatureSupport(
|
||||
D3D12_FEATURE_MULTISAMPLE_QUALITY_LEVELS,
|
||||
&multisample_quality_levels,
|
||||
sizeof(multisample_quality_levels))) ||
|
||||
!multisample_quality_levels.NumQualityLevels) {
|
||||
msaa_2x_supported_ = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif // DEBUG
|
||||
if (!msaa_2x_supported_) {
|
||||
XELOGW(
|
||||
"2x MSAA is not supported, emulated via top-left and bottom-right "
|
||||
|
|
|
@ -172,6 +172,7 @@ DEFINE_bool(
|
|||
"GPU");
|
||||
DEFINE_bool(
|
||||
native_2x_msaa, true,
|
||||
"Only does anything in debug builds."
|
||||
"Use host 2x MSAA when available. Can be disabled for scalability testing "
|
||||
"on host GPU APIs where 2x is not mandatory, in this case, 2 samples of 4x "
|
||||
"MSAA will be used instead (with similar or worse quality and higher "
|
||||
|
@ -179,6 +180,7 @@ DEFINE_bool(
|
|||
"GPU");
|
||||
DEFINE_bool(
|
||||
native_stencil_value_output, true,
|
||||
"Only does anything in debug builds."
|
||||
"Use pixel shader stencil reference output where available for purposes "
|
||||
"like copying between render targets. Can be disabled for scalability "
|
||||
"testing, in this case, much more expensive drawing of 8 quads will be "
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
|
||||
DEFINE_bool(
|
||||
allow_plugins, false,
|
||||
"Allows loading of plugins/trainers from plugins\\title_id\\plugin.xex."
|
||||
"Plugin are homebrew xex modules which can be used for making mods "
|
||||
"Allows loading of plugins/trainers from plugins\\title_id\\plugin.xex. "
|
||||
"Plugin are homebrew xex modules which can be used for making mods. "
|
||||
"This feature is experimental.",
|
||||
"General");
|
||||
|
||||
|
|
Loading…
Reference in New Issue