mirror of
https://github.com/PCSX2/pcsx2.git
synced 2025-04-02 10:52:54 -04:00
Compare commits
No commits in common. "master" and "v2.3.236" have entirely different histories.
28 changed files with 1181 additions and 1409 deletions
|
@ -1,48 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$#" -ne 2 ]; then
|
||||
echo "Syntax: $0 <deps directory> <output directory>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DEPSDIR=$(realpath "$1")
|
||||
INSTALLDIR=$(realpath "$2")
|
||||
|
||||
if [ ! -d "$DEPSDIR/include/QtCore" ]; then
|
||||
echo "Error: The build-dependencies-qt.sh script must be run on the deps directory first."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
GAMMARAY=master
|
||||
|
||||
mkdir -p gammaray-build
|
||||
cd gammaray-build
|
||||
|
||||
echo "Downloading..."
|
||||
curl -L -o "GammaRay-$GAMMARAY.tar.gz" https://github.com/KDAB/GammaRay/archive/$GAMMARAY.tar.gz
|
||||
|
||||
rm -fr "GammaRay-$GAMMARAY"
|
||||
|
||||
echo "Extracting..."
|
||||
tar xf "GammaRay-$GAMMARAY.tar.gz"
|
||||
|
||||
cd "GammaRay-$GAMMARAY"
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
echo "Configuring..."
|
||||
cmake -DCMAKE_PREFIX_PATH="$DEPSDIR" -G Ninja -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DGAMMARAY_BUILD_DOCS=false ..
|
||||
|
||||
echo "Building..."
|
||||
cmake --build . --parallel
|
||||
|
||||
echo "Installing..."
|
||||
cmake --build . --target install
|
||||
|
||||
cd ../..
|
||||
|
||||
echo "Cleaning up..."
|
||||
cd ..
|
||||
rm -r gammaray-build
|
|
@ -1,68 +0,0 @@
|
|||
@echo off
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
echo Setting environment...
|
||||
if exist "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" (
|
||||
call "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
|
||||
) else if exist "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" (
|
||||
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"
|
||||
) else (
|
||||
echo Visual Studio 2022 not found.
|
||||
goto error
|
||||
)
|
||||
|
||||
pushd %~dp0
|
||||
|
||||
cd ..\..\..\..
|
||||
cd deps || goto error
|
||||
set "DEPSDIR=%CD%"
|
||||
cd ..
|
||||
mkdir gammaray
|
||||
cd gammaray || goto error
|
||||
set "INSTALLDIR=%CD%"
|
||||
cd ..
|
||||
mkdir gammaray-build
|
||||
cd gammaray-build || goto error
|
||||
set "BUILDDIR=%CD%"
|
||||
|
||||
echo DEPSDIR=%DEPSDIR%
|
||||
echo BUILDDIR=%BUILDDIR%
|
||||
echo INSTALLDIR=%INSTALLDIR%
|
||||
|
||||
set GAMMARAY="master"
|
||||
|
||||
echo Downloading...
|
||||
curl -L -o "GammaRay-%GAMMARAY%.tar.gz" "https://github.com/KDAB/GammaRay/archive/%GAMMARAY%.tar.gz" || goto error
|
||||
|
||||
rmdir /s /q "GammaRay-%GAMMARAY%"
|
||||
|
||||
echo Extracting...
|
||||
tar -xf "GammaRay-%GAMMARAY%.tar.gz" || goto error
|
||||
|
||||
echo Configuring...
|
||||
cmake "GammaRay-%GAMMARAY%" -B build -DCMAKE_PREFIX_PATH="%DEPSDIR%" -G Ninja -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DGAMMARAY_BUILD_DOCS=false || goto error
|
||||
|
||||
echo Building...
|
||||
cmake --build build --parallel || goto error
|
||||
|
||||
echo Installing...
|
||||
cmake --build build --target install || goto errorlevel
|
||||
|
||||
echo Copying DLLs...
|
||||
xcopy /y "%DEPSDIR%\bin\*.dll" "%INSTALLDIR%\bin\"
|
||||
xcopy /y /e /s "%DEPSDIR%\plugins" "%INSTALLDIR%\bin\"
|
||||
|
||||
echo Cleaning up...
|
||||
cd ..
|
||||
rd /s /q gammaray-build
|
||||
|
||||
echo Exiting with success.
|
||||
popd
|
||||
pause
|
||||
exit 0
|
||||
|
||||
:error
|
||||
echo Failed with error #%errorlevel%.
|
||||
popd
|
||||
pause
|
||||
exit %errorlevel%
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -109,8 +109,6 @@ oprofile_data/
|
|||
/deps-build
|
||||
/deps
|
||||
/deps-arm64
|
||||
/gammaray-build
|
||||
/gammaray
|
||||
/ipch
|
||||
|
||||
!/3rdparty/libjpeg/change.log
|
||||
|
|
11
3rdparty/cpuinfo/include/cpuinfo.h
vendored
11
3rdparty/cpuinfo/include/cpuinfo.h
vendored
|
@ -522,8 +522,6 @@ enum cpuinfo_uarch {
|
|||
cpuinfo_uarch_falkor = 0x00400103,
|
||||
/** Qualcomm Saphira. */
|
||||
cpuinfo_uarch_saphira = 0x00400104,
|
||||
/** Qualcomm Oryon. */
|
||||
cpuinfo_uarch_oryon = 0x00400105,
|
||||
|
||||
/** Nvidia Denver. */
|
||||
cpuinfo_uarch_denver = 0x00500100,
|
||||
|
@ -823,7 +821,6 @@ struct cpuinfo_x86_isa {
|
|||
bool avx512_4vnniw;
|
||||
bool avx512_4fmaps;
|
||||
bool avx10_1;
|
||||
bool avx10_2;
|
||||
bool amx_bf16;
|
||||
bool amx_tile;
|
||||
bool amx_int8;
|
||||
|
@ -1447,14 +1444,6 @@ static inline bool cpuinfo_has_x86_avx10_1(void) {
|
|||
#endif
|
||||
}
|
||||
|
||||
static inline bool cpuinfo_has_x86_avx10_2(void) {
|
||||
#if CPUINFO_ARCH_X86 || CPUINFO_ARCH_X86_64
|
||||
return cpuinfo_isa.avx10_2;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline bool cpuinfo_has_x86_hle(void) {
|
||||
#if CPUINFO_ARCH_X86 || CPUINFO_ARCH_X86_64
|
||||
return cpuinfo_isa.hle;
|
||||
|
|
28
3rdparty/cpuinfo/src/arm/api.h
vendored
28
3rdparty/cpuinfo/src/arm/api.h
vendored
|
@ -1,11 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define RESTRICT_STATIC /* nothing for MSVC */
|
||||
#else
|
||||
#define RESTRICT_STATIC restrict static
|
||||
#endif
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
|
@ -88,11 +82,11 @@ struct cpuinfo_arm_chipset {
|
|||
|
||||
#ifndef __cplusplus
|
||||
CPUINFO_INTERNAL void cpuinfo_arm_chipset_to_string(
|
||||
const struct cpuinfo_arm_chipset chipset[RESTRICT_STATIC 1],
|
||||
char name[RESTRICT_STATIC CPUINFO_ARM_CHIPSET_NAME_MAX]);
|
||||
const struct cpuinfo_arm_chipset chipset[restrict static 1],
|
||||
char name[restrict static CPUINFO_ARM_CHIPSET_NAME_MAX]);
|
||||
|
||||
CPUINFO_INTERNAL void cpuinfo_arm_fixup_chipset(
|
||||
struct cpuinfo_arm_chipset chipset[RESTRICT_STATIC 1],
|
||||
struct cpuinfo_arm_chipset chipset[restrict static 1],
|
||||
uint32_t cores,
|
||||
uint32_t max_cpu_freq_max);
|
||||
|
||||
|
@ -101,23 +95,23 @@ CPUINFO_INTERNAL void cpuinfo_arm_decode_vendor_uarch(
|
|||
#if CPUINFO_ARCH_ARM
|
||||
bool has_vfpv4,
|
||||
#endif
|
||||
enum cpuinfo_vendor vendor[RESTRICT_STATIC 1],
|
||||
enum cpuinfo_uarch uarch[RESTRICT_STATIC 1]);
|
||||
enum cpuinfo_vendor vendor[restrict static 1],
|
||||
enum cpuinfo_uarch uarch[restrict static 1]);
|
||||
|
||||
CPUINFO_INTERNAL void cpuinfo_arm_decode_cache(
|
||||
enum cpuinfo_uarch uarch,
|
||||
uint32_t cluster_cores,
|
||||
uint32_t midr,
|
||||
const struct cpuinfo_arm_chipset chipset[RESTRICT_STATIC 1],
|
||||
const struct cpuinfo_arm_chipset chipset[restrict static 1],
|
||||
uint32_t cluster_id,
|
||||
uint32_t arch_version,
|
||||
struct cpuinfo_cache l1i[RESTRICT_STATIC 1],
|
||||
struct cpuinfo_cache l1d[RESTRICT_STATIC 1],
|
||||
struct cpuinfo_cache l2[RESTRICT_STATIC 1],
|
||||
struct cpuinfo_cache l3[RESTRICT_STATIC 1]);
|
||||
struct cpuinfo_cache l1i[restrict static 1],
|
||||
struct cpuinfo_cache l1d[restrict static 1],
|
||||
struct cpuinfo_cache l2[restrict static 1],
|
||||
struct cpuinfo_cache l3[restrict static 1]);
|
||||
|
||||
CPUINFO_INTERNAL uint32_t
|
||||
cpuinfo_arm_compute_max_cache_size(const struct cpuinfo_processor processor[RESTRICT_STATIC 1]);
|
||||
cpuinfo_arm_compute_max_cache_size(const struct cpuinfo_processor processor[restrict static 1]);
|
||||
#else /* defined(__cplusplus) */
|
||||
CPUINFO_INTERNAL void cpuinfo_arm_decode_cache(
|
||||
enum cpuinfo_uarch uarch,
|
||||
|
|
1
3rdparty/cpuinfo/src/arm/mach/init.c
vendored
1
3rdparty/cpuinfo/src/arm/mach/init.c
vendored
|
@ -101,6 +101,7 @@ static enum cpuinfo_uarch decode_uarch(uint32_t cpu_family, uint32_t core_index,
|
|||
return cpuinfo_uarch_unknown;
|
||||
}
|
||||
|
||||
/* Small bodge until cpuinfo merges PR #246 */
|
||||
static int read_package_name_from_brand_string(char* package_name) {
|
||||
size_t size;
|
||||
if (sysctlbyname("machdep.cpu.brand_string", NULL, &size, NULL, 0) != 0) {
|
||||
|
|
7
3rdparty/cpuinfo/src/arm/uarch.c
vendored
7
3rdparty/cpuinfo/src/arm/uarch.c
vendored
|
@ -9,8 +9,8 @@ void cpuinfo_arm_decode_vendor_uarch(
|
|||
#if CPUINFO_ARCH_ARM
|
||||
bool has_vfpv4,
|
||||
#endif /* CPUINFO_ARCH_ARM */
|
||||
enum cpuinfo_vendor vendor[RESTRICT_STATIC 1],
|
||||
enum cpuinfo_uarch uarch[RESTRICT_STATIC 1]) {
|
||||
enum cpuinfo_vendor vendor[restrict static 1],
|
||||
enum cpuinfo_uarch uarch[restrict static 1]) {
|
||||
switch (midr_get_implementer(midr)) {
|
||||
case 'A':
|
||||
*vendor = cpuinfo_vendor_arm;
|
||||
|
@ -332,9 +332,6 @@ void cpuinfo_arm_decode_vendor_uarch(
|
|||
*uarch = cpuinfo_uarch_cortex_a55;
|
||||
break;
|
||||
#if CPUINFO_ARCH_ARM64
|
||||
case 0x001:
|
||||
*uarch = cpuinfo_uarch_oryon;
|
||||
break;
|
||||
case 0xC00:
|
||||
*uarch = cpuinfo_uarch_falkor;
|
||||
break;
|
||||
|
|
|
@ -750,14 +750,11 @@ void store_core_info_per_processor(
|
|||
if (cores) {
|
||||
processors[processor_global_index].core = cores + core_id;
|
||||
cores[core_id].core_id = core_id;
|
||||
|
||||
if (chip_info->uarchs == NULL) {
|
||||
cpuinfo_log_error("uarch is NULL for core %d", core_id);
|
||||
return;
|
||||
}
|
||||
|
||||
cores[core_id].uarch = chip_info->uarchs[0].uarch;
|
||||
cores[core_id].frequency = chip_info->uarchs[0].frequency;
|
||||
get_core_uarch_for_efficiency(
|
||||
chip_info->chip_name,
|
||||
core_info->Processor.EfficiencyClass,
|
||||
&(cores[core_id].uarch),
|
||||
&(cores[core_id].frequency));
|
||||
|
||||
/* We don't have cluster information, so we handle it as
|
||||
* fixed 1 to (cluster / cores).
|
||||
|
|
187
3rdparty/cpuinfo/src/arm/windows/init.c
vendored
187
3rdparty/cpuinfo/src/arm/windows/init.c
vendored
|
@ -7,9 +7,6 @@
|
|||
#include <cpuinfo/internal-api.h>
|
||||
#include <cpuinfo/log.h>
|
||||
|
||||
#include <arm/api.h>
|
||||
#include <arm/midr.h>
|
||||
|
||||
#include "windows-arm-init.h"
|
||||
|
||||
struct cpuinfo_arm_isa cpuinfo_isa;
|
||||
|
@ -17,7 +14,62 @@ struct cpuinfo_arm_isa cpuinfo_isa;
|
|||
static void set_cpuinfo_isa_fields(void);
|
||||
static struct woa_chip_info* get_system_info_from_registry(void);
|
||||
|
||||
static struct woa_chip_info woa_chip_unknown = {L"Unknown", {{cpuinfo_vendor_unknown, cpuinfo_uarch_unknown, 0}}};
|
||||
static struct woa_chip_info woa_chip_unknown = {
|
||||
L"Unknown",
|
||||
woa_chip_name_unknown,
|
||||
{{cpuinfo_vendor_unknown, cpuinfo_uarch_unknown, 0}}};
|
||||
|
||||
/* Please add new SoC/chip info here! */
|
||||
static struct woa_chip_info woa_chips[woa_chip_name_last] = {
|
||||
/* Microsoft SQ1 Kryo 495 4 + 4 cores (3 GHz + 1.80 GHz) */
|
||||
[woa_chip_name_microsoft_sq_1] =
|
||||
{L"Microsoft SQ1",
|
||||
woa_chip_name_microsoft_sq_1,
|
||||
{{
|
||||
cpuinfo_vendor_arm,
|
||||
cpuinfo_uarch_cortex_a55,
|
||||
1800000000,
|
||||
},
|
||||
{
|
||||
cpuinfo_vendor_arm,
|
||||
cpuinfo_uarch_cortex_a76,
|
||||
3000000000,
|
||||
}}},
|
||||
/* Microsoft SQ2 Kryo 495 4 + 4 cores (3.15 GHz + 2.42 GHz) */
|
||||
[woa_chip_name_microsoft_sq_2] =
|
||||
{L"Microsoft SQ2",
|
||||
woa_chip_name_microsoft_sq_2,
|
||||
{{
|
||||
cpuinfo_vendor_arm,
|
||||
cpuinfo_uarch_cortex_a55,
|
||||
2420000000,
|
||||
},
|
||||
{cpuinfo_vendor_arm, cpuinfo_uarch_cortex_a76, 3150000000}}},
|
||||
/* Snapdragon (TM) 8cx Gen 3 @ 3.0 GHz */
|
||||
[woa_chip_name_microsoft_sq_3] =
|
||||
{L"Snapdragon (TM) 8cx Gen 3",
|
||||
woa_chip_name_microsoft_sq_3,
|
||||
{{
|
||||
cpuinfo_vendor_arm,
|
||||
cpuinfo_uarch_cortex_a78,
|
||||
2420000000,
|
||||
},
|
||||
{cpuinfo_vendor_arm, cpuinfo_uarch_cortex_x1, 3000000000}}},
|
||||
/* Microsoft Windows Dev Kit 2023 */
|
||||
[woa_chip_name_microsoft_sq_3_devkit] =
|
||||
{L"Snapdragon Compute Platform",
|
||||
woa_chip_name_microsoft_sq_3_devkit,
|
||||
{{
|
||||
cpuinfo_vendor_arm,
|
||||
cpuinfo_uarch_cortex_a78,
|
||||
2420000000,
|
||||
},
|
||||
{cpuinfo_vendor_arm, cpuinfo_uarch_cortex_x1, 3000000000}}},
|
||||
/* Ampere Altra */
|
||||
[woa_chip_name_ampere_altra] = {
|
||||
L"Ampere(R) Altra(R) Processor",
|
||||
woa_chip_name_ampere_altra,
|
||||
{{cpuinfo_vendor_arm, cpuinfo_uarch_neoverse_n1, 3000000000}}}};
|
||||
|
||||
BOOL CALLBACK cpuinfo_arm_windows_init(PINIT_ONCE init_once, PVOID parameter, PVOID* context) {
|
||||
struct woa_chip_info* chip_info = NULL;
|
||||
|
@ -35,6 +87,23 @@ BOOL CALLBACK cpuinfo_arm_windows_init(PINIT_ONCE init_once, PVOID parameter, PV
|
|||
return true;
|
||||
}
|
||||
|
||||
bool get_core_uarch_for_efficiency(
|
||||
enum woa_chip_name chip,
|
||||
BYTE EfficiencyClass,
|
||||
enum cpuinfo_uarch* uarch,
|
||||
uint64_t* frequency) {
|
||||
/* For currently supported WoA chips, the Efficiency class selects
|
||||
* the pre-defined little and big core.
|
||||
* Any further supported SoC's logic should be implemented here.
|
||||
*/
|
||||
if (uarch && frequency && chip < woa_chip_name_last && EfficiencyClass < MAX_WOA_VALID_EFFICIENCY_CLASSES) {
|
||||
*uarch = woa_chips[chip].uarchs[EfficiencyClass].uarch;
|
||||
*frequency = woa_chips[chip].uarchs[EfficiencyClass].frequency;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Static helper functions */
|
||||
|
||||
static wchar_t* read_registry(LPCWSTR subkey, LPCWSTR value) {
|
||||
|
@ -80,112 +149,40 @@ static wchar_t* read_registry(LPCWSTR subkey, LPCWSTR value) {
|
|||
return text_buffer;
|
||||
}
|
||||
|
||||
static uint64_t read_registry_qword(LPCWSTR subkey, LPCWSTR value) {
|
||||
DWORD key_type = 0;
|
||||
DWORD data_size = sizeof(uint64_t);
|
||||
const DWORD flags = RRF_RT_REG_QWORD; /* Only read QWORD (REG_QWORD) values */
|
||||
uint64_t qword_value = 0;
|
||||
LSTATUS result = RegGetValueW(HKEY_LOCAL_MACHINE, subkey, value, flags, &key_type, &qword_value, &data_size);
|
||||
if (result != ERROR_SUCCESS || data_size != sizeof(uint64_t)) {
|
||||
cpuinfo_log_error("Registry QWORD read error");
|
||||
return 0;
|
||||
}
|
||||
return qword_value;
|
||||
}
|
||||
|
||||
static uint64_t read_registry_dword(LPCWSTR subkey, LPCWSTR value) {
|
||||
DWORD key_type = 0;
|
||||
DWORD data_size = sizeof(DWORD);
|
||||
DWORD dword_value = 0;
|
||||
LSTATUS result =
|
||||
RegGetValueW(HKEY_LOCAL_MACHINE, subkey, value, RRF_RT_REG_DWORD, &key_type, &dword_value, &data_size);
|
||||
if (result != ERROR_SUCCESS || data_size != sizeof(DWORD)) {
|
||||
cpuinfo_log_error("Registry DWORD read error");
|
||||
return 0;
|
||||
}
|
||||
return (uint64_t)dword_value;
|
||||
}
|
||||
|
||||
static wchar_t* wcsndup(const wchar_t* src, size_t n) {
|
||||
size_t len = wcsnlen(src, n);
|
||||
wchar_t* dup = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (len + 1) * sizeof(wchar_t));
|
||||
if (dup) {
|
||||
wcsncpy_s(dup, len + 1, src, len);
|
||||
dup[len] = L'\0';
|
||||
}
|
||||
return dup;
|
||||
}
|
||||
|
||||
static struct core_info_by_chip_name get_core_info_from_midr(uint32_t midr, uint64_t frequency) {
|
||||
struct core_info_by_chip_name info;
|
||||
enum cpuinfo_vendor vendor;
|
||||
enum cpuinfo_uarch uarch;
|
||||
|
||||
#if CPUINFO_ARCH_ARM
|
||||
bool has_vfpv4 = false;
|
||||
cpuinfo_arm_decode_vendor_uarch(midr, has_vfpv4, &vendor, &uarch);
|
||||
#else
|
||||
cpuinfo_arm_decode_vendor_uarch(midr, &vendor, &uarch);
|
||||
#endif
|
||||
|
||||
info.vendor = vendor;
|
||||
info.uarch = uarch;
|
||||
info.frequency = frequency;
|
||||
return info;
|
||||
}
|
||||
|
||||
static struct woa_chip_info* get_system_info_from_registry(void) {
|
||||
wchar_t* text_buffer = NULL;
|
||||
LPCWSTR cpu0_subkey = L"HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0";
|
||||
LPCWSTR chip_name_value = L"ProcessorNameString";
|
||||
LPCWSTR chip_midr_value = L"CP 4000";
|
||||
LPCWSTR chip_mhz_value = L"~MHz";
|
||||
struct woa_chip_info* chip_info = NULL;
|
||||
|
||||
HANDLE heap = GetProcessHeap();
|
||||
|
||||
/* Read processor model name from registry and find in the hard-coded
|
||||
* list. */
|
||||
text_buffer = read_registry(cpu0_subkey, chip_name_value);
|
||||
if (text_buffer == NULL) {
|
||||
cpuinfo_log_error("Registry read error for processor name");
|
||||
cpuinfo_log_error("Registry read error");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* https://developer.arm.com/documentation/100442/0100/register-descriptions/aarch32-system-registers/midr--main-id-register
|
||||
* Regedit for MIDR :
|
||||
*HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0\CP 4000
|
||||
*/
|
||||
uint64_t midr_qword = (uint32_t)read_registry_qword(cpu0_subkey, chip_midr_value);
|
||||
if (midr_qword == 0) {
|
||||
cpuinfo_log_error("Registry read error for MIDR value");
|
||||
return NULL;
|
||||
for (uint32_t i = 0; i < (uint32_t)woa_chip_name_last; i++) {
|
||||
size_t compare_length = wcsnlen(woa_chips[i].chip_name_string, CPUINFO_PACKAGE_NAME_MAX);
|
||||
int compare_result = wcsncmp(text_buffer, woa_chips[i].chip_name_string, compare_length);
|
||||
if (compare_result == 0) {
|
||||
chip_info = woa_chips + i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// MIDR is only 32 bits, so we need to cast it to uint32_t
|
||||
uint32_t midr_value = (uint32_t)midr_qword;
|
||||
|
||||
/* Read the frequency from the registry
|
||||
* The value is in MHz, so we need to convert it to Hz */
|
||||
uint64_t frequency_mhz = read_registry_dword(cpu0_subkey, chip_mhz_value);
|
||||
if (frequency_mhz == 0) {
|
||||
cpuinfo_log_error("Registry read error for frequency value");
|
||||
return NULL;
|
||||
}
|
||||
// Convert MHz to Hz
|
||||
uint64_t frequency_hz = frequency_mhz * 1000000;
|
||||
|
||||
// Allocate chip_info before using it.
|
||||
chip_info = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(struct woa_chip_info));
|
||||
if (chip_info == NULL) {
|
||||
cpuinfo_log_error("Heap allocation error for chip_info");
|
||||
return NULL;
|
||||
/* No match was found, so print a warning and assign the unknown
|
||||
* case. */
|
||||
cpuinfo_log_error(
|
||||
"Unknown chip model name '%ls'.\nPlease add new Windows on Arm SoC/chip support to arm/windows/init.c!",
|
||||
text_buffer);
|
||||
} else {
|
||||
cpuinfo_log_debug("detected chip model name: %s", chip_info->chip_name_string);
|
||||
}
|
||||
|
||||
// set chip_info fields
|
||||
chip_info->chip_name_string = wcsndup(text_buffer, CPUINFO_PACKAGE_NAME_MAX - 1);
|
||||
chip_info->uarchs[0] = get_core_info_from_midr(midr_value, frequency_hz);
|
||||
|
||||
cpuinfo_log_debug("detected chip model name: %ls", chip_info->chip_name_string);
|
||||
|
||||
HeapFree(heap, 0, text_buffer);
|
||||
return chip_info;
|
||||
}
|
||||
|
||||
|
@ -219,4 +216,4 @@ static void set_cpuinfo_isa_fields(void) {
|
|||
cpuinfo_isa.pmull = crypto;
|
||||
|
||||
cpuinfo_isa.crc32 = IsProcessorFeaturePresent(PF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE) != 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,17 @@
|
|||
/* Efficiency class = 0 means little core, while 1 means big core for now. */
|
||||
#define MAX_WOA_VALID_EFFICIENCY_CLASSES 2
|
||||
|
||||
/* List of known and supported Windows on Arm SoCs/chips. */
|
||||
enum woa_chip_name {
|
||||
woa_chip_name_microsoft_sq_1 = 0,
|
||||
woa_chip_name_microsoft_sq_2 = 1,
|
||||
woa_chip_name_microsoft_sq_3 = 2,
|
||||
woa_chip_name_microsoft_sq_3_devkit = 3,
|
||||
woa_chip_name_ampere_altra = 4,
|
||||
woa_chip_name_unknown = 5,
|
||||
woa_chip_name_last = woa_chip_name_unknown
|
||||
};
|
||||
|
||||
/* Topology information hard-coded by SoC/chip name */
|
||||
struct core_info_by_chip_name {
|
||||
enum cpuinfo_vendor vendor;
|
||||
|
@ -15,7 +26,14 @@ struct core_info_by_chip_name {
|
|||
*/
|
||||
struct woa_chip_info {
|
||||
wchar_t* chip_name_string;
|
||||
enum woa_chip_name chip_name;
|
||||
struct core_info_by_chip_name uarchs[MAX_WOA_VALID_EFFICIENCY_CLASSES];
|
||||
};
|
||||
|
||||
bool get_core_uarch_for_efficiency(
|
||||
enum woa_chip_name chip,
|
||||
BYTE EfficiencyClass,
|
||||
enum cpuinfo_uarch* uarch,
|
||||
uint64_t* frequency);
|
||||
|
||||
bool cpu_info_init_by_logical_sys_info(const struct woa_chip_info* chip_info, enum cpuinfo_vendor vendor);
|
||||
|
|
11
3rdparty/cpuinfo/src/x86/isa.c
vendored
11
3rdparty/cpuinfo/src/x86/isa.c
vendored
|
@ -46,8 +46,6 @@ struct cpuinfo_x86_isa cpuinfo_x86_detect_isa(
|
|||
(max_base_index >= 7) ? cpuidex(7, 0) : (struct cpuid_regs){0, 0, 0, 0};
|
||||
const struct cpuid_regs structured_feature_info1 =
|
||||
(max_base_index >= 7) ? cpuidex(7, 1) : (struct cpuid_regs){0, 0, 0, 0};
|
||||
const struct cpuid_regs structured_feature_info2 =
|
||||
(max_base_index >= 7) ? cpuidex(0x24, 0) : (struct cpuid_regs){0, 0, 0, 0};
|
||||
|
||||
const uint32_t processor_capacity_info_index = UINT32_C(0x80000008);
|
||||
const struct cpuid_regs processor_capacity_info = (max_extended_index >= processor_capacity_info_index)
|
||||
|
@ -432,17 +430,10 @@ struct cpuinfo_x86_isa cpuinfo_x86_detect_isa(
|
|||
isa.avx512f = avx512_regs && !!(structured_feature_info0.ebx & UINT32_C(0x00010000));
|
||||
|
||||
/*
|
||||
* AVX 10.1 instructions: avx 10 isa supported.
|
||||
* - Intel: edx[bit 19] in structured feature info (ecx = 1).
|
||||
* AVX 10.1 instructions:
|
||||
*/
|
||||
isa.avx10_1 = avx512_regs && !!(structured_feature_info1.edx & UINT32_C(0x00080000));
|
||||
|
||||
/*
|
||||
* AVX 10.2 instructions: avx 10 version information.
|
||||
* - Intel: ebx[bits 0-7] in structured features info (eax = 24 ecx = 0).
|
||||
*/
|
||||
isa.avx10_2 = ((structured_feature_info2.ebx & UINT32_C(0x000000FF)) >= 2) && isa.avx10_1;
|
||||
|
||||
/*
|
||||
* AVX512PF instructions:
|
||||
* - Intel: ebx[bit 26] in structured feature info (ecx = 0).
|
||||
|
|
5
3rdparty/cpuinfo/src/x86/linux/cpuinfo.c
vendored
5
3rdparty/cpuinfo/src/x86/linux/cpuinfo.c
vendored
|
@ -83,9 +83,8 @@ struct proc_cpuinfo_parser_state {
|
|||
static bool parse_line(
|
||||
const char* line_start,
|
||||
const char* line_end,
|
||||
void* context,
|
||||
struct proc_cpuinfo_parser_state state[restrict static 1],
|
||||
uint64_t line_number) {
|
||||
struct proc_cpuinfo_parser_state* restrict state = context;
|
||||
/* Empty line. Skip. */
|
||||
if (line_start == line_end) {
|
||||
return true;
|
||||
|
@ -216,5 +215,5 @@ bool cpuinfo_x86_linux_parse_proc_cpuinfo(
|
|||
.processors = processors,
|
||||
};
|
||||
return cpuinfo_linux_parse_multiline_file(
|
||||
"/proc/cpuinfo", BUFFER_SIZE, parse_line, &state);
|
||||
"/proc/cpuinfo", BUFFER_SIZE, (cpuinfo_line_callback)parse_line, &state);
|
||||
}
|
||||
|
|
|
@ -610,7 +610,6 @@
|
|||
03000000921200004547000000000000,Retro Bit Sega Genesis Controller Adapter,a:b0,b:b1,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,lefttrigger:b7,rightshoulder:b5,righttrigger:b2,start:b6,x:b3,y:b4,platform:Windows,
|
||||
03000000790000001100000000000000,Retro Controller,a:b1,b:b2,back:b8,dpdown:+a4,dpleft:-a3,dpright:+a3,dpup:-a4,leftshoulder:b6,lefttrigger:b7,rightshoulder:b4,righttrigger:b5,start:b9,x:b0,y:b3,platform:Windows,
|
||||
03000000830500006020000000000000,Retro Controller,a:b0,b:b1,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,lefttrigger:b5,rightshoulder:b8,righttrigger:b9,start:b7,x:b2,y:b3,platform:Windows,
|
||||
03000000632500007805000000000000,Retro Fighters Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
|
||||
0300000003040000c197000000000000,Retrode Adapter,a:b0,b:b4,back:b2,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b3,x:b1,y:b5,platform:Windows,
|
||||
03000000bd12000013d0000000000000,Retrolink Sega Saturn Classic Controller,a:b0,b:b1,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b5,lefttrigger:b6,rightshoulder:b2,righttrigger:b7,start:b8,x:b3,y:b4,platform:Windows,
|
||||
03000000bd12000015d0000000000000,Retrolink SNES Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b9,x:b3,y:b0,platform:Windows,
|
||||
|
@ -758,8 +757,8 @@
|
|||
03000000ff1100004133000000000000,USB Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a4,righty:a2,start:b9,x:b3,y:b0,platform:Windows,
|
||||
03000000632500002305000000000000,USB Vibration Joystick,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
|
||||
03000000882800000305000000000000,V5 Game Pad,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,x:b2,y:b3,platform:Windows,
|
||||
03000000790000001a18000000000000,Venom PS4 Arcade Joystick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
|
||||
03000000790000001b18000000000000,Venom PS4 Arcade Joystick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
|
||||
03000000790000001a18000000000000,Venom,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
|
||||
03000000790000001b18000000000000,Venom Arcade Joystick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,
|
||||
030000006f0e00000302000000000000,Victrix PS4 Pro Fightstick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,touchpad:b13,x:b0,y:b3,platform:Windows,
|
||||
030000006f0e00000702000000000000,Victrix PS4 Pro Fightstick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,touchpad:b13,x:b0,y:b3,platform:Windows,
|
||||
0300000034120000adbe000000000000,vJoy Device,a:b0,b:b1,back:b15,dpdown:b6,dpleft:b7,dpright:b8,dpup:b5,guide:b16,leftshoulder:b9,leftstick:b13,lefttrigger:b11,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b14,righttrigger:b12,rightx:a3,righty:a4,start:b4,x:b2,y:b3,platform:Windows,
|
||||
|
@ -1289,7 +1288,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
|||
03000000451300000010000010010000,Genius Maxfire Grandias 12,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,
|
||||
190000004b4800000010000000010000,GO-Advance Controller,a:b1,b:b0,back:b10,dpdown:b7,dpleft:b8,dpright:b9,dpup:b6,leftshoulder:b4,lefttrigger:b12,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b13,start:b15,x:b2,y:b3,platform:Linux,
|
||||
190000004b4800000010000001010000,GO-Advance Controller,a:b1,b:b0,back:b12,dpdown:b9,dpleft:b10,dpright:b11,dpup:b8,leftshoulder:b4,leftstick:b13,lefttrigger:b14,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b16,righttrigger:b15,start:b17,x:b2,y:b3,platform:Linux,
|
||||
190000004b4800000011000000010000,GO-Super Gamepad,a:b0,b:b1,back:b12,dpdown:b9,dpleft:b10,dpright:b11,dpup:b8,guide:b16,leftshoulder:b4,leftstick:b14,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b15,righttrigger:b7,rightx:a2,righty:a3,start:b13,x:b3,y:b2,platform:Linux,
|
||||
190000004b4800000011000000010000,GO-Super Controller,a:b1,b:b0,back:b12,dpdown:b9,dpleft:b10,dpright:b11,dpup:b8,guide:b16,leftshoulder:b4,leftstick:b14,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b15,righttrigger:b7,rightx:a2,righty:a3,start:b13,x:b2,y:b3,platform:Linux,
|
||||
03000000f0250000c183000010010000,Goodbetterbest Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
|
||||
03000000d11800000094000011010000,Google Stadia Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Linux,
|
||||
05000000d11800000094000000010000,Google Stadia Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Linux,
|
||||
|
@ -1426,7 +1425,6 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
|||
030000005e040000d102000003020000,Microsoft Xbox One,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
030000005e040000dd02000003020000,Microsoft Xbox One,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
030000005e040000ea02000008040000,Microsoft Xbox One,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
030000005e040000ea0200000f050000,Microsoft Xbox One,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
060000005e040000120b000009050000,Microsoft Xbox One,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,misc1:b11,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
030000005e040000e302000003020000,Microsoft Xbox One Elite,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
030000005e040000000b000007040000,Microsoft Xbox One Elite 2,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,paddle1:b12,paddle2:b14,paddle3:b13,paddle4:b15,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
|
@ -1720,8 +1718,6 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
|||
03000000100800000300000010010000,USB Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Linux,
|
||||
03000000790000000600000007010000,USB gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a4,start:b9,x:b3,y:b0,platform:Linux,
|
||||
03000000790000001100000000010000,USB Gamepad,a:b2,b:b1,back:b8,dpdown:a0,dpleft:a1,dpright:a2,dpup:a4,start:b9,platform:Linux,
|
||||
03000000790000001a18000011010000,Venom PS4 Arcade Joystick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
|
||||
03000000790000001b18000011010000,Venom PS4 Arcade Joystick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
|
||||
030000006f0e00000302000011010000,Victrix Pro Fightstick PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,touchpad:b13,x:b0,y:b3,platform:Linux,
|
||||
030000006f0e00000702000011010000,Victrix Pro Fightstick PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,touchpad:b13,x:b0,y:b3,platform:Linux,
|
||||
05000000ac0500003232000001000000,VR Box Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b2,y:b3,platform:Linux,
|
||||
|
|
|
@ -25,8 +25,7 @@
|
|||
#define SW_AD_TO_HW (PS_BLEND_C == 1 && PS_A_MASKED)
|
||||
#define PS_PRIMID_INIT (PS_DATE == 1 || PS_DATE == 2)
|
||||
#define NEEDS_RT_EARLY (PS_TEX_IS_FB == 1 || PS_DATE >= 5)
|
||||
#define NEEDS_RT_FOR_AFAIL (PS_AFAIL == 3 && PS_NO_COLOR1)
|
||||
#define NEEDS_RT (NEEDS_RT_EARLY || NEEDS_RT_FOR_AFAIL || (!PS_PRIMID_INIT && (PS_FBMASK || SW_BLEND_NEEDS_RT || SW_AD_TO_HW)))
|
||||
#define NEEDS_RT (NEEDS_RT_EARLY || (!PS_PRIMID_INIT && (PS_FBMASK || SW_BLEND_NEEDS_RT || SW_AD_TO_HW)))
|
||||
#define NEEDS_TEX (PS_TFX != 4)
|
||||
|
||||
layout(std140, binding = 0) uniform cb21
|
||||
|
@ -1115,7 +1114,7 @@ void ps_main()
|
|||
|
||||
ps_fbmask(C);
|
||||
|
||||
#if PS_AFAIL == 3 && !PS_NO_COLOR1 // RGB_ONLY
|
||||
#if PS_AFAIL == 3 // RGB_ONLY
|
||||
// Use alpha blend factor to determine whether to update A.
|
||||
alpha_blend.a = float(atst_pass);
|
||||
#endif
|
||||
|
@ -1131,10 +1130,6 @@ void ps_main()
|
|||
#else
|
||||
SV_Target0.rgb = C.rgb / 255.0f;
|
||||
#endif
|
||||
#if PS_AFAIL == 3 && !PS_NO_COLOR1 // RGB_ONLY, no dual src blend
|
||||
if (!atst_pass)
|
||||
SV_Target0.a = sample_from_rt().a;
|
||||
#endif
|
||||
#if !PS_NO_COLOR1
|
||||
SV_Target1 = alpha_blend;
|
||||
#endif
|
||||
|
|
|
@ -299,9 +299,8 @@ void main()
|
|||
#define SW_BLEND (PS_BLEND_A || PS_BLEND_B || PS_BLEND_D)
|
||||
#define SW_BLEND_NEEDS_RT (SW_BLEND && (PS_BLEND_A == 1 || PS_BLEND_B == 1 || PS_BLEND_C == 1 || PS_BLEND_D == 1))
|
||||
#define SW_AD_TO_HW (PS_BLEND_C == 1 && PS_A_MASKED)
|
||||
#define AFAIL_NEEDS_RT (PS_AFAIL == 3 && PS_NO_COLOR1)
|
||||
|
||||
#define PS_FEEDBACK_LOOP_IS_NEEDED (PS_TEX_IS_FB == 1 || AFAIL_NEEDS_RT || PS_FBMASK || SW_BLEND_NEEDS_RT || SW_AD_TO_HW || (PS_DATE >= 5))
|
||||
#define PS_FEEDBACK_LOOP_IS_NEEDED (PS_TEX_IS_FB == 1 || PS_FBMASK || SW_BLEND_NEEDS_RT || SW_AD_TO_HW || (PS_DATE >= 5))
|
||||
|
||||
#define NEEDS_TEX (PS_TFX != 4)
|
||||
|
||||
|
@ -1382,7 +1381,7 @@ void main()
|
|||
|
||||
ps_fbmask(C);
|
||||
|
||||
#if PS_AFAIL == 3 && !PS_NO_COLOR1 // RGB_ONLY
|
||||
#if PS_AFAIL == 3 // RGB_ONLY
|
||||
// Use alpha blend factor to determine whether to update A.
|
||||
alpha_blend.a = float(atst_pass);
|
||||
#endif
|
||||
|
@ -1401,10 +1400,6 @@ void main()
|
|||
#if !PS_NO_COLOR1
|
||||
o_col1 = alpha_blend;
|
||||
#endif
|
||||
#if PS_AFAIL == 3 && PS_NO_COLOR1 // RGB_ONLY, no dual src blend
|
||||
if (!atst_pass)
|
||||
o_col0.a = sample_from_rt().a;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if PS_ZCLAMP
|
||||
|
|
|
@ -59,7 +59,7 @@ int BreakpointModel::columnCount(const QModelIndex&) const
|
|||
|
||||
QVariant BreakpointModel::data(const QModelIndex& index, int role) const
|
||||
{
|
||||
const size_t row = static_cast<size_t>(index.row());
|
||||
size_t row = static_cast<size_t>(index.row());
|
||||
if (!index.isValid() || row >= m_breakpoints.size())
|
||||
return QVariant();
|
||||
|
||||
|
@ -298,7 +298,7 @@ Qt::ItemFlags BreakpointModel::flags(const QModelIndex& index) const
|
|||
|
||||
bool BreakpointModel::setData(const QModelIndex& index, const QVariant& value, int role)
|
||||
{
|
||||
const size_t row = static_cast<size_t>(index.row());
|
||||
size_t row = static_cast<size_t>(index.row());
|
||||
if (!index.isValid() || row >= m_breakpoints.size())
|
||||
return false;
|
||||
|
||||
|
@ -401,14 +401,9 @@ bool BreakpointModel::setData(const QModelIndex& index, const QVariant& value, i
|
|||
|
||||
bool BreakpointModel::removeRows(int row, int count, const QModelIndex& index)
|
||||
{
|
||||
const size_t begin_index = static_cast<size_t>(row);
|
||||
const size_t end_index = static_cast<size_t>(row + count);
|
||||
if (end_index > m_breakpoints.size())
|
||||
return false;
|
||||
|
||||
beginRemoveRows(index, row, row + count - 1);
|
||||
|
||||
for (size_t i = begin_index; i < end_index; i++)
|
||||
for (int i = row; i < row + count; i++)
|
||||
{
|
||||
auto bp_mc = m_breakpoints.at(i);
|
||||
|
||||
|
@ -425,7 +420,6 @@ bool BreakpointModel::removeRows(int row, int count, const QModelIndex& index)
|
|||
});
|
||||
}
|
||||
}
|
||||
|
||||
const auto begin = m_breakpoints.begin() + row;
|
||||
const auto end = begin + count;
|
||||
m_breakpoints.erase(begin, end);
|
||||
|
|
|
@ -111,14 +111,16 @@ void BreakpointWidget::contextDelete()
|
|||
if (!selModel->hasSelection())
|
||||
return;
|
||||
|
||||
QModelIndexList indices = selModel->selectedIndexes();
|
||||
QModelIndexList rows = selModel->selectedIndexes();
|
||||
|
||||
std::set<int> rows;
|
||||
for (QModelIndex index : indices)
|
||||
rows.emplace(index.row());
|
||||
std::sort(rows.begin(), rows.end(), [](const QModelIndex& a, const QModelIndex& b) {
|
||||
return a.row() > b.row();
|
||||
});
|
||||
|
||||
for (auto row = rows.rbegin(); row != rows.rend(); row++)
|
||||
m_model->removeRows(*row, 1);
|
||||
for (const QModelIndex& index : rows)
|
||||
{
|
||||
m_model->removeRows(index.row(), 1);
|
||||
}
|
||||
}
|
||||
|
||||
void BreakpointWidget::contextNew()
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -22,21 +22,15 @@
|
|||
<Filter Include="Debugger">
|
||||
<UniqueIdentifier>{ddb40cc4-9996-4ade-b647-eb549063553c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Debugger\Models">
|
||||
<UniqueIdentifier>{f4084ca0-d9d5-4584-b9d2-063db9f67de2}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Translations">
|
||||
<UniqueIdentifier>{ad04f939-64a0-4039-97aa-a38b8aa46855}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Debugger\SymbolTree">
|
||||
<UniqueIdentifier>{a622b871-62ae-4b70-b9b2-6ee30ce7fa7a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Debugger\Breakpoints">
|
||||
<UniqueIdentifier>{694f359a-dd3c-4e05-b000-684acb0fe0b0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Debugger\Docking">
|
||||
<UniqueIdentifier>{669ad4fe-0b5a-4722-946c-9e0742cebbca}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Debugger\Memory">
|
||||
<UniqueIdentifier>{63790c94-0680-417d-926c-a8b74118f80f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\pcsx2\windows\PCSX2.rc" />
|
||||
|
@ -308,6 +302,51 @@
|
|||
<ClCompile Include="Debugger\ThreadWidget.cpp">
|
||||
<Filter>Debugger</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Breakpoints\BreakpointDialog.cpp">
|
||||
<Filter>Debugger\Breakpoints</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Breakpoints\BreakpointModel.cpp">
|
||||
<Filter>Debugger\Breakpoints</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Breakpoints\BreakpointWidget.cpp">
|
||||
<Filter>Debugger\Breakpoints</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Docking\DockLayout.cpp">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Docking\DockManager.cpp">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Docking\DockTables.cpp">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Docking\DockUtils.cpp">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Docking\DockViews.cpp">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Docking\DropIndicators.cpp">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Docking\LayoutEditorDialog.cpp">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Docking\NoLayoutsWidget.cpp">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Memory\MemorySearchWidget.cpp">
|
||||
<Filter>Debugger\Memory</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Memory\MemoryViewWidget.cpp">
|
||||
<Filter>Debugger\Memory</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Memory\SavedAddressesModel.cpp">
|
||||
<Filter>Debugger\Memory</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Memory\SavedAddressesWidget.cpp">
|
||||
<Filter>Debugger\Memory</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)Debugger\moc_AnalysisOptionsDialog.cpp">
|
||||
<Filter>moc</Filter>
|
||||
</ClCompile>
|
||||
|
@ -422,72 +461,6 @@
|
|||
<Filter>Debugger\SymbolTree</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="VCRuntimeChecker.cpp" />
|
||||
<ClCompile Include="Debugger\Breakpoints\BreakpointDialog.cpp">
|
||||
<Filter>Debugger\Breakpoints</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Breakpoints\BreakpointModel.cpp">
|
||||
<Filter>Debugger\Breakpoints</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Breakpoints\BreakpointWidget.cpp">
|
||||
<Filter>Debugger\Breakpoints</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Docking\DockLayout.cpp">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Docking\DockManager.cpp">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Docking\DockTables.cpp">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Docking\DockUtils.cpp">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Docking\DockViews.cpp">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Docking\DropIndicators.cpp">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Memory\SavedAddressesModel.cpp">
|
||||
<Filter>Debugger\Memory</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Memory\SavedAddressesWidget.cpp">
|
||||
<Filter>Debugger\Memory</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Memory\MemorySearchWidget.cpp">
|
||||
<Filter>Debugger\Memory</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Memory\MemoryViewWidget.cpp">
|
||||
<Filter>Debugger\Memory</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Docking\LayoutEditorDialog.cpp">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Docking\NoLayoutsWidget.cpp">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)Debugger\SymbolTree\moc_NewSymbolDialogs.cpp">
|
||||
<Filter>moc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)Debugger\SymbolTree\moc_SymbolTreeDelegates.cpp">
|
||||
<Filter>moc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)Debugger\SymbolTree\moc_SymbolTreeLocation.cpp">
|
||||
<Filter>moc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)Debugger\SymbolTree\moc_SymbolTreeModel.cpp">
|
||||
<Filter>moc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)Debugger\SymbolTree\moc_SymbolTreeNode.cpp">
|
||||
<Filter>moc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)Debugger\SymbolTree\moc_SymbolTreeWidgets.cpp">
|
||||
<Filter>moc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)Debugger\SymbolTree\moc_TypeString.cpp">
|
||||
<Filter>moc</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Manifest Include="..\pcsx2\windows\PCSX2.manifest">
|
||||
|
@ -510,6 +483,27 @@
|
|||
<ClInclude Include="Debugger\DebuggerSettingsManager.h">
|
||||
<Filter>Debugger</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Debugger\SymbolTree\NewSymbolDialogs.h">
|
||||
<Filter>Debugger\SymbolTree</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Debugger\SymbolTree\SymbolTreeDelegates.h">
|
||||
<Filter>Debugger\SymbolTree</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Debugger\SymbolTree\SymbolTreeLocation.h">
|
||||
<Filter>Debugger\SymbolTree</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Debugger\SymbolTree\SymbolTreeModel.h">
|
||||
<Filter>Debugger\SymbolTree</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Debugger\SymbolTree\SymbolTreeNode.h">
|
||||
<Filter>Debugger\SymbolTree</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Debugger\SymbolTree\SymbolTreeWidgets.h">
|
||||
<Filter>Debugger\SymbolTree</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Debugger\SymbolTree\TypeString.h">
|
||||
<Filter>Debugger\SymbolTree</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtMoc Include="MainWindow.h" />
|
||||
|
@ -646,16 +640,6 @@
|
|||
<QtMoc Include="Debugger\ThreadWidget.h">
|
||||
<Filter>Debugger</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="ColorPickerButton.h" />
|
||||
<QtMoc Include="SetupWizardDialog.h" />
|
||||
<QtMoc Include="Settings\GameCheatSettingsWidget.h">
|
||||
<Filter>Settings</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Settings\GamePatchSettingsWidget.h">
|
||||
<Filter>Settings</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="LogWindow.h" />
|
||||
<QtMoc Include="Debugger\SymbolTree\TypeString.h" />
|
||||
<QtMoc Include="Debugger\Breakpoints\BreakpointDialog.h">
|
||||
<Filter>Debugger\Breakpoints</Filter>
|
||||
</QtMoc>
|
||||
|
@ -683,26 +667,11 @@
|
|||
<QtMoc Include="Debugger\Docking\DropIndicators.h">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Debugger\SymbolTree\SymbolTreeWidgets.h">
|
||||
<Filter>Debugger\SymbolTree</Filter>
|
||||
<QtMoc Include="Debugger\Docking\LayoutEditorDialog.h">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Debugger\SymbolTree\SymbolTreeDelegates.h">
|
||||
<Filter>Debugger\SymbolTree</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Debugger\SymbolTree\SymbolTreeLocation.h">
|
||||
<Filter>Debugger\SymbolTree</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Debugger\SymbolTree\SymbolTreeModel.h">
|
||||
<Filter>Debugger\SymbolTree</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Debugger\SymbolTree\SymbolTreeNode.h">
|
||||
<Filter>Debugger\SymbolTree</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Debugger\Memory\SavedAddressesModel.h">
|
||||
<Filter>Debugger\Memory</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Debugger\Memory\SavedAddressesWidget.h">
|
||||
<Filter>Debugger\Memory</Filter>
|
||||
<QtMoc Include="Debugger\Docking\NoLayoutsWidget.h">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Debugger\Memory\MemorySearchWidget.h">
|
||||
<Filter>Debugger\Memory</Filter>
|
||||
|
@ -710,15 +679,21 @@
|
|||
<QtMoc Include="Debugger\Memory\MemoryViewWidget.h">
|
||||
<Filter>Debugger\Memory</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Debugger\Docking\LayoutEditorDialog.h">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
<QtMoc Include="Debugger\Memory\SavedAddressesModel.h">
|
||||
<Filter>Debugger\Memory</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Debugger\Docking\NoLayoutsWidget.h">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
<QtMoc Include="Debugger\Memory\SavedAddressesWidget.h">
|
||||
<Filter>Debugger\Memory</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Debugger\SymbolTree\NewSymbolDialogs.h">
|
||||
<Filter>Debugger\SymbolTree</Filter>
|
||||
<QtMoc Include="ColorPickerButton.h" />
|
||||
<QtMoc Include="SetupWizardDialog.h" />
|
||||
<QtMoc Include="Settings\GameCheatSettingsWidget.h">
|
||||
<Filter>Settings</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Settings\GamePatchSettingsWidget.h">
|
||||
<Filter>Settings</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="LogWindow.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtResource Include="resources\resources.qrc">
|
||||
|
@ -840,6 +815,27 @@
|
|||
<QtUi Include="Debugger\RegisterWidget.ui">
|
||||
<Filter>Debugger</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Debugger\Breakpoints\BreakpointDialog.ui">
|
||||
<Filter>Debugger\Breakpoints</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Debugger\Breakpoints\BreakpointWidget.ui">
|
||||
<Filter>Debugger\Breakpoints</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Debugger\Docking\LayoutEditorDialog.ui">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Debugger\Docking\NoLayoutsWidget.ui">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Debugger\Memory\MemorySearchWidget.ui">
|
||||
<Filter>Debugger\Memory</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Debugger\Memory\MemoryViewWidget.ui">
|
||||
<Filter>Debugger\Memory</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Debugger\Memory\SavedAddressesWidget.ui">
|
||||
<Filter>Debugger\Memory</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\ControllerLEDSettingsDialog.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
|
@ -889,27 +885,6 @@
|
|||
<QtUi Include="Settings\AudioStretchSettingsDialog.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Debugger\Breakpoints\BreakpointDialog.ui">
|
||||
<Filter>Debugger\Breakpoints</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Debugger\Breakpoints\BreakpointWidget.ui">
|
||||
<Filter>Debugger\Breakpoints</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Debugger\Memory\SavedAddressesWidget.ui">
|
||||
<Filter>Debugger\Memory</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Debugger\Memory\MemoryViewWidget.ui">
|
||||
<Filter>Debugger\Memory</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Debugger\Memory\MemorySearchWidget.ui">
|
||||
<Filter>Debugger\Memory</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Debugger\Docking\LayoutEditorDialog.ui">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Debugger\Docking\NoLayoutsWidget.ui">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
</QtUi>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Settings\FolderSettingsWidget.ui">
|
||||
|
@ -933,4 +908,4 @@
|
|||
<Filter>Translations</Filter>
|
||||
</QtTs>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
|
@ -212,7 +212,7 @@ bool GSHwHack::GSC_Tekken5(GSRendererHW& r, int& skip)
|
|||
{
|
||||
if (skip == 0)
|
||||
{
|
||||
if (r.IsPossibleChannelShuffle() && !(RTBP0 & 31))
|
||||
if (r.IsPossibleChannelShuffle() && (RTBP0 & 31))
|
||||
{
|
||||
GSVertex* v = &r.m_vertex.buff[0];
|
||||
|
||||
|
|
|
@ -4259,7 +4259,14 @@ void GSRendererHW::EmulateBlending(int rt_alpha_min, int rt_alpha_max, const boo
|
|||
m_conf.ps.blend_d = 2;
|
||||
}
|
||||
}
|
||||
if (m_conf.ps.blend_c == 1)
|
||||
// When AA1 is enabled and Alpha Blending is disabled, alpha blending done with coverage instead of alpha.
|
||||
// We use a COV value of 128 (full coverage) in triangles (except the edge geometry, which we can't do easily).
|
||||
if (IsCoverageAlpha())
|
||||
{
|
||||
m_conf.ps.fixed_one_a = 1;
|
||||
m_conf.ps.blend_c = 0;
|
||||
}
|
||||
else if (m_conf.ps.blend_c == 1)
|
||||
{
|
||||
// When both rt alpha min and max are equal replace Ad with Af, easier to manage.
|
||||
if (rt_alpha_min == rt_alpha_max)
|
||||
|
@ -6162,9 +6169,6 @@ __ri void GSRendererHW::DrawPrims(GSTextureCache::Target* rt, GSTextureCache::Ta
|
|||
new_scale_rt_alpha = rt->m_rt_alpha_scale;
|
||||
}
|
||||
|
||||
// AA1: Set alpha source to coverage 128 when there is no alpha blending.
|
||||
m_conf.ps.fixed_one_a = IsCoverageAlpha();
|
||||
|
||||
if ((!IsOpaque() || m_context->ALPHA.IsBlack()) && rt && ((m_conf.colormask.wrgba & 0x7) || (m_texture_shuffle && !m_copy_16bit_to_target_shuffle && !m_same_group_texture_shuffle)))
|
||||
{
|
||||
EmulateBlending(blend_alpha_min, blend_alpha_max, DATE, DATE_PRIMID, DATE_BARRIER, rt, can_scale_rt_alpha, new_scale_rt_alpha);
|
||||
|
@ -6173,6 +6177,7 @@ __ri void GSRendererHW::DrawPrims(GSTextureCache::Target* rt, GSTextureCache::Ta
|
|||
{
|
||||
m_conf.blend = {}; // No blending please
|
||||
m_conf.ps.no_color1 = true;
|
||||
m_conf.ps.fixed_one_a = IsCoverageAlpha();
|
||||
|
||||
if (can_scale_rt_alpha && !new_scale_rt_alpha && m_conf.colormask.wa)
|
||||
{
|
||||
|
@ -6235,32 +6240,23 @@ __ri void GSRendererHW::DrawPrims(GSTextureCache::Target* rt, GSTextureCache::Ta
|
|||
// Blending might be off, ensure it's enabled.
|
||||
// We write the alpha pass/fail to SRC1_ALPHA, which is used to update A.
|
||||
m_conf.ps.afail = AFAIL_RGB_ONLY;
|
||||
if ((features.framebuffer_fetch && m_conf.require_one_barrier) || m_conf.require_full_barrier)
|
||||
m_conf.ps.no_color1 = false;
|
||||
if (!m_conf.blend.enable)
|
||||
{
|
||||
// We're reading the rt anyways, use it for AFAIL
|
||||
// This ensures we don't attempt to use fbfetch + blend, which breaks Intel GPUs on Metal
|
||||
// Setting afail to RGB_ONLY without enabling color1 will enable this mode in the shader, so nothing more to do here.
|
||||
m_conf.blend = GSHWDrawConfig::BlendState(true, GSDevice::CONST_ONE, GSDevice::CONST_ZERO,
|
||||
GSDevice::OP_ADD, GSDevice::SRC1_ALPHA, GSDevice::INV_SRC1_ALPHA, false, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_conf.ps.no_color1 = false;
|
||||
if (!m_conf.blend.enable)
|
||||
if (m_conf.blend_multi_pass.enable)
|
||||
{
|
||||
m_conf.blend = GSHWDrawConfig::BlendState(true, GSDevice::CONST_ONE, GSDevice::CONST_ZERO,
|
||||
GSDevice::OP_ADD, GSDevice::SRC1_ALPHA, GSDevice::INV_SRC1_ALPHA, false, 0);
|
||||
m_conf.blend_multi_pass.blend.src_factor_alpha = GSDevice::SRC1_ALPHA;
|
||||
m_conf.blend_multi_pass.blend.dst_factor_alpha = GSDevice::INV_SRC1_ALPHA;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_conf.blend_multi_pass.enable)
|
||||
{
|
||||
m_conf.blend_multi_pass.blend.src_factor_alpha = GSDevice::SRC1_ALPHA;
|
||||
m_conf.blend_multi_pass.blend.dst_factor_alpha = GSDevice::INV_SRC1_ALPHA;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_conf.blend.src_factor_alpha = GSDevice::SRC1_ALPHA;
|
||||
m_conf.blend.dst_factor_alpha = GSDevice::INV_SRC1_ALPHA;
|
||||
}
|
||||
m_conf.blend.src_factor_alpha = GSDevice::SRC1_ALPHA;
|
||||
m_conf.blend.dst_factor_alpha = GSDevice::INV_SRC1_ALPHA;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -219,7 +219,6 @@ public:
|
|||
MRCOwned<id<MTLFence>> m_draw_sync_fence;
|
||||
MRCOwned<MTLFunctionConstantValues*> m_fn_constants;
|
||||
MRCOwned<MTLVertexDescriptor*> m_hw_vertex;
|
||||
MTLResourceOptions m_resource_options_shared_wc;
|
||||
|
||||
// Previously in MetalHostDisplay.
|
||||
MRCOwned<NSView*> m_view;
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#include "common/Console.h"
|
||||
#include "common/HostSys.h"
|
||||
|
||||
#include "cpuinfo.h"
|
||||
#include "imgui.h"
|
||||
|
||||
#ifdef __APPLE__
|
||||
|
@ -91,12 +90,6 @@ GSDeviceMTL::GSDeviceMTL()
|
|||
, m_dev(nil)
|
||||
{
|
||||
m_backref->second = this;
|
||||
m_resource_options_shared_wc = MTLResourceStorageModeShared | MTLResourceCPUCacheModeWriteCombined;
|
||||
#ifdef _M_X86
|
||||
// WC memory doesn't work properly on AMD hackintoshes, and ends up being horribly slow even when only writing
|
||||
if (cpuinfo_get_core(0)->vendor == cpuinfo_vendor_amd)
|
||||
m_resource_options_shared_wc = MTLResourceStorageModeShared;
|
||||
#endif
|
||||
}
|
||||
|
||||
GSDeviceMTL::~GSDeviceMTL()
|
||||
|
@ -114,7 +107,7 @@ GSDeviceMTL::Map GSDeviceMTL::Allocate(UploadBuffer& buffer, size_t amt)
|
|||
size_t newsize = std::max<size_t>(buffer.usage.Size() * 2, 4096);
|
||||
while (newsize < amt)
|
||||
newsize *= 2;
|
||||
MTLResourceOptions options = m_resource_options_shared_wc;
|
||||
MTLResourceOptions options = MTLResourceStorageModeShared | MTLResourceCPUCacheModeWriteCombined;
|
||||
buffer.mtlbuffer = MRCTransfer([m_dev.dev newBufferWithLength:newsize options:options]);
|
||||
pxAssertRel(buffer.mtlbuffer, "Failed to allocate MTLBuffer (out of memory?)");
|
||||
buffer.buffer = [buffer.mtlbuffer contents];
|
||||
|
@ -155,7 +148,7 @@ GSDeviceMTL::Map GSDeviceMTL::Allocate(BufferPair& buffer, size_t amt)
|
|||
size_t newsize = std::max<size_t>(buffer.usage.Size() * 2, 4096);
|
||||
while (newsize < amt)
|
||||
newsize *= 2;
|
||||
MTLResourceOptions options = m_resource_options_shared_wc;
|
||||
MTLResourceOptions options = MTLResourceStorageModeShared | MTLResourceCPUCacheModeWriteCombined;
|
||||
buffer.cpubuffer = MRCTransfer([m_dev.dev newBufferWithLength:newsize options:options]);
|
||||
pxAssertRel(buffer.cpubuffer, "Failed to allocate MTLBuffer (out of memory?)");
|
||||
buffer.buffer = [buffer.cpubuffer contents];
|
||||
|
@ -1284,7 +1277,7 @@ void GSDeviceMTL::UpdateTexture(id<MTLTexture> texture, u32 x, u32 y, u32 width,
|
|||
id<MTLCommandBuffer> cmdbuf = [m_queue commandBuffer];
|
||||
id<MTLBlitCommandEncoder> enc = [cmdbuf blitCommandEncoder];
|
||||
size_t bytes = data_stride * height;
|
||||
MRCOwned<id<MTLBuffer>> buf = MRCTransfer([m_dev.dev newBufferWithLength:bytes options:m_resource_options_shared_wc]);
|
||||
MRCOwned<id<MTLBuffer>> buf = MRCTransfer([m_dev.dev newBufferWithLength:bytes options:MTLResourceStorageModeShared | MTLResourceCPUCacheModeWriteCombined]);
|
||||
memcpy([buf contents], data, bytes);
|
||||
[enc copyFromBuffer:buf
|
||||
sourceOffset:0
|
||||
|
|
|
@ -97,8 +97,7 @@ constant bool SW_BLEND = (PS_BLEND_A != PS_BLEND_B) || PS_BLEND_D;
|
|||
constant bool SW_AD_TO_HW = (PS_BLEND_C == 1 && PS_A_MASKED);
|
||||
constant bool NEEDS_RT_FOR_BLEND = (((PS_BLEND_A != PS_BLEND_B) && (PS_BLEND_A == 1 || PS_BLEND_B == 1 || PS_BLEND_C == 1)) || PS_BLEND_D == 1 || SW_AD_TO_HW);
|
||||
constant bool NEEDS_RT_EARLY = PS_TEX_IS_FB || PS_DATE >= 5;
|
||||
constant bool NEEDS_RT_FOR_AFAIL = PS_AFAIL == 3 && PS_NO_COLOR1;
|
||||
constant bool NEEDS_RT = NEEDS_RT_FOR_AFAIL || NEEDS_RT_EARLY || (!PS_PRIM_CHECKING_INIT && (PS_FBMASK || NEEDS_RT_FOR_BLEND));
|
||||
constant bool NEEDS_RT = NEEDS_RT_EARLY || (!PS_PRIM_CHECKING_INIT && (PS_FBMASK || NEEDS_RT_FOR_BLEND));
|
||||
|
||||
constant bool PS_COLOR0 = !PS_NO_COLOR;
|
||||
constant bool PS_COLOR1 = !PS_NO_COLOR1;
|
||||
|
@ -1203,12 +1202,8 @@ struct PSMain
|
|||
alpha_blend.a = float(atst_pass);
|
||||
|
||||
if (PS_COLOR0)
|
||||
{
|
||||
out.c0.a = PS_RTA_CORRECTION ? C.a / 128.f : C.a / 255.f;
|
||||
out.c0.rgb = PS_HDR ? float3(C.rgb / 65535.f) : C.rgb / 255.f;
|
||||
if (PS_AFAIL == 3 && !PS_COLOR1 && !atst_pass) // Doing RGB_ONLY without COLOR1
|
||||
out.c0.a = current_color.a;
|
||||
}
|
||||
if (PS_COLOR1)
|
||||
out.c1 = alpha_blend;
|
||||
if (PS_ZCLAMP)
|
||||
|
|
|
@ -4091,12 +4091,6 @@ void FullscreenUI::DrawGraphicsSettingsPage(SettingsInterface* bsi, bool show_ad
|
|||
FSUI_NSTR("Enabled (All Primitives)"),
|
||||
};
|
||||
|
||||
static constexpr const char* s_gpu_clut_options[] = {
|
||||
FSUI_NSTR("Disabled (Default)"),
|
||||
FSUI_NSTR("Enabled (Exact Match)"),
|
||||
FSUI_NSTR("Enabled (Check Inside Target)"),
|
||||
};
|
||||
|
||||
DrawIntListSetting(bsi, FSUI_CSTR("CPU Sprite Render Size"),
|
||||
FSUI_CSTR("Uses software renderer to draw texture decompression-like sprites."), "EmuCore/GS",
|
||||
"UserHacks_CPUSpriteRenderBW", 0, s_cpu_sprite_render_bw_options, std::size(s_cpu_sprite_render_bw_options), true);
|
||||
|
@ -4106,9 +4100,6 @@ void FullscreenUI::DrawGraphicsSettingsPage(SettingsInterface* bsi, bool show_ad
|
|||
DrawIntListSetting(bsi, FSUI_CSTR("Software CLUT Render"),
|
||||
FSUI_CSTR("Uses software renderer to draw texture CLUT points/sprites."), "EmuCore/GS", "UserHacks_CPUCLUTRender", 0,
|
||||
s_cpu_clut_render_options, std::size(s_cpu_clut_render_options), true);
|
||||
DrawIntListSetting(bsi, FSUI_CSTR("GPU Target CLUT"),
|
||||
FSUI_CSTR("Try to detect when a game is drawing its own color palette and then renders it on the GPU with special handling."), "EmuCore/GS", "UserHacks_GPUTargetCLUTMode",
|
||||
0, s_gpu_clut_options, std::size(s_gpu_clut_options), true, 0, manual_hw_fixes);
|
||||
DrawIntSpinBoxSetting(bsi, FSUI_CSTR("Skip Draw Start"), FSUI_CSTR("Object range to skip drawing."), "EmuCore/GS",
|
||||
"UserHacks_SkipDraw_Start", 0, 0, 5000, 1);
|
||||
DrawIntSpinBoxSetting(bsi, FSUI_CSTR("Skip Draw End"), FSUI_CSTR("Object range to skip drawing."), "EmuCore/GS",
|
||||
|
@ -7400,8 +7391,6 @@ TRANSLATE_NOOP("FullscreenUI", "CPU Sprite Render Level");
|
|||
TRANSLATE_NOOP("FullscreenUI", "Determines filter level for CPU sprite render.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Software CLUT Render");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Uses software renderer to draw texture CLUT points/sprites.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "GPU Target CLUT");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Try to detect when a game is drawing its own color palette and then renders it on the GPU with special handling.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Skip Draw Start");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Object range to skip drawing.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Skip Draw End");
|
||||
|
@ -7876,8 +7865,6 @@ TRANSLATE_NOOP("FullscreenUI", "Force Nearest");
|
|||
TRANSLATE_NOOP("FullscreenUI", "Disabled (Default)");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Enabled (Sprites Only)");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Enabled (All Primitives)");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Enabled (Exact Match)");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Enabled (Check Inside Target)");
|
||||
TRANSLATE_NOOP("FullscreenUI", "None (Default)");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Sharpen Only (Internal Resolution)");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Sharpen and Resize (Display Resolution)");
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
|
||||
/// Version number for GS and other shaders. Increment whenever any of the contents of the
|
||||
/// shaders change, to invalidate the cache.
|
||||
static constexpr u32 SHADER_CACHE_VERSION = 60;
|
||||
static constexpr u32 SHADER_CACHE_VERSION = 59;
|
||||
|
|
|
@ -1736,7 +1736,7 @@ StartRecomp:
|
|||
}
|
||||
}
|
||||
|
||||
pxAssert(xGetPtr() < SysMemory::GetIOPRecEnd());
|
||||
pxAssert(xGetPtr() < recPtrEnd);
|
||||
|
||||
pxAssert(xGetPtr() - recPtr < _64kb);
|
||||
s_pCurBlockEx->x86size = xGetPtr() - recPtr;
|
||||
|
|
|
@ -900,7 +900,7 @@ u8* recEndThunk()
|
|||
{
|
||||
u8* block_end = x86Ptr;
|
||||
|
||||
pxAssert(block_end < SysMemory::GetEERecEnd());
|
||||
pxAssert(block_end < recPtrEnd);
|
||||
recPtr = block_end;
|
||||
return block_end;
|
||||
}
|
||||
|
@ -2698,7 +2698,7 @@ StartRecomp:
|
|||
}
|
||||
}
|
||||
|
||||
pxAssert(xGetPtr() < SysMemory::GetEERecEnd());
|
||||
pxAssert(xGetPtr() < recPtrEnd);
|
||||
|
||||
s_pCurBlockEx->x86size = static_cast<u32>(xGetPtr() - recPtr);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue