diff --git a/.travis.yml b/.travis.yml
index 299efd864e..00b9e054aa 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -41,11 +41,11 @@ before_install:
# Install updated libglew-dev since the version provided by trusty is outdated
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then
- wget http://mirrors.kernel.org/ubuntu/pool/main/g/glew/libglew-dev_1.13.0-2_amd64.deb;
- wget http://mirrors.kernel.org/ubuntu/pool/main/g/glew/libglew1.13_1.13.0-2_amd64.deb;
- wget http://mirrors.kernel.org/ubuntu/pool/universe/v/vulkan/libvulkan1_1.0.42.0+dfsg1-1ubuntu1~16.04.1_amd64.deb;
- wget http://mirrors.kernel.org/ubuntu/pool/universe/v/vulkan/libvulkan-dev_1.0.42.0+dfsg1-1ubuntu1~16.04.1_amd64.deb;
- sudo dpkg -i libglew1.13_1.13.0-2_amd64.deb libglew-dev_1.13.0-2_amd64.deb libvulkan1_1.0.42.0+dfsg1-1ubuntu1~16.04.1_amd64.deb libvulkan-dev_1.0.42.0+dfsg1-1ubuntu1~16.04.1_amd64.deb;
+ wget http://mirrors.kernel.org/ubuntu/pool/main/g/glew/libglew-dev_2.0.0-3_amd64.deb;
+ wget http://mirrors.kernel.org/ubuntu/pool/main/g/glew/libglew2.0_2.0.0-3_amd64.deb;
+ wget http://mirrors.kernel.org/ubuntu/pool/universe/v/vulkan/libvulkan1_1.0.61.1+dfsg1-1ubuntu1~16.04.1_amd64.deb;
+ wget http://mirrors.kernel.org/ubuntu/pool/universe/v/vulkan/libvulkan-dev_1.0.61.1+dfsg1-1ubuntu1~16.04.1_amd64.deb;
+ sudo dpkg -i libglew2.0_2.0.0-3_amd64.deb libglew-dev_2.0.0-3_amd64.deb libvulkan1_1.0.61.1+dfsg1-1ubuntu1~16.04.1_amd64.deb libvulkan-dev_1.0.61.1+dfsg1-1ubuntu1~16.04.1_amd64.deb;
else
brew update;
brew install ccache glew llvm40;
diff --git a/Vulkan/Vulkan-LoaderAndValidationLayers b/Vulkan/Vulkan-LoaderAndValidationLayers
index 85926a33d4..28d93dfc0f 160000
--- a/Vulkan/Vulkan-LoaderAndValidationLayers
+++ b/Vulkan/Vulkan-LoaderAndValidationLayers
@@ -1 +1 @@
-Subproject commit 85926a33d427ee62f395a50886db980127063c72
+Subproject commit 28d93dfc0f24d65237fd773d74a284bf6e399222
diff --git a/Vulkan/Vulkan-build/Vulkan-build.vcxproj b/Vulkan/Vulkan-build/Vulkan-build.vcxproj
index 50850770b1..d2306790e8 100644
--- a/Vulkan/Vulkan-build/Vulkan-build.vcxproj
+++ b/Vulkan/Vulkan-build/Vulkan-build.vcxproj
@@ -39,18 +39,22 @@
- cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DBUILD_TESTS=OFF -DBUILD_DEMOS=OFF -DBUILD_LAYERS=OFF -DBUILD_VKJSON=OFF ../Vulkan-LoaderAndValidationLayers
+ start /W /B pre-build.bat
+cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DBUILD_TESTS=OFF -DBUILD_DEMOS=OFF -DBUILD_LAYERS=OFF -DBUILD_VKJSON=OFF ../Vulkan-LoaderAndValidationLayers
msbuild.exe ALL_BUILD.vcxproj /t:build /p:Configuration=Release /m
cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DBUILD_TESTS=OFF -DBUILD_DEMOS=OFF -DBUILD_LAYERS=OFF -DBUILD_VKJSON=OFF ../Vulkan-LoaderAndValidationLayers
msbuild.exe ALL_BUILD.vcxproj /t:clean /p:Configuration=Release /m
- cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DBUILD_TESTS=OFF -DBUILD_DEMOS=OFF -DBUILD_LAYERS=OFF -DBUILD_VKJSON=OFF ../Vulkan-LoaderAndValidationLayers
+ start /W /B pre-build.bat
+cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DBUILD_TESTS=OFF -DBUILD_DEMOS=OFF -DBUILD_LAYERS=OFF -DBUILD_VKJSON=OFF ../Vulkan-LoaderAndValidationLayers
msbuild.exe ALL_BUILD.vcxproj /t:rebuild /p:Configuration=Release /m
- cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DBUILD_TESTS=OFF -DBUILD_DEMOS=OFF -DBUILD_LAYERS=OFF -DBUILD_VKJSON=OFF ../Vulkan-LoaderAndValidationLayers
+ start /W /B pre-build.bat
+cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DBUILD_TESTS=OFF -DBUILD_DEMOS=OFF -DBUILD_LAYERS=OFF -DBUILD_VKJSON=OFF ../Vulkan-LoaderAndValidationLayers
msbuild.exe ALL_BUILD.vcxproj /t:build /p:Configuration=Debug /m
- cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DBUILD_TESTS=OFF -DBUILD_DEMOS=OFF -DBUILD_LAYERS=OFF -DBUILD_VKJSON=OFF ../Vulkan-LoaderAndValidationLayers
+ start /W /B pre-build.bat
+cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DBUILD_TESTS=OFF -DBUILD_DEMOS=OFF -DBUILD_LAYERS=OFF -DBUILD_VKJSON=OFF ../Vulkan-LoaderAndValidationLayers
msbuild.exe ALL_BUILD.vcxproj /t:rebuild /p:Configuration=Debug /m
cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DBUILD_TESTS=OFF -DBUILD_DEMOS=OFF -DBUILD_LAYERS=OFF -DBUILD_VKJSON=OFF ../Vulkan-LoaderAndValidationLayers
msbuild.exe ALL_BUILD.vcxproj /t:clean /p:Configuration=Debug /m
diff --git a/Vulkan/Vulkan-build/pre-build.bat b/Vulkan/Vulkan-build/pre-build.bat
new file mode 100644
index 0000000000..a9de5dd443
--- /dev/null
+++ b/Vulkan/Vulkan-build/pre-build.bat
@@ -0,0 +1,13 @@
+@ECHO OFF
+
+REM Setting up dummy git helper
+MKDIR ..\Vulkan-LoaderAndValidationLayers\external\glslang\External\spirv-tools
+SET header="@ECHO off"
+SET content="ECHO unused"
+ECHO %header:"=% > git.bat
+ECHO %content:"=% >> git.bat
+COPY /Y git.bat ..\Vulkan-LoaderAndValidationLayers\external\glslang\External\spirv-tools\git.bat
+
+REM Set up gitignore
+SET ignored="*"
+ECHO %ignored:"=% > ..\Vulkan-LoaderAndValidationLayers\external\glslang\External\spirv-tools\.gitignore
\ No newline at end of file
diff --git a/Vulkan/glslang b/Vulkan/glslang
index cf571f7310..e22e347395 160000
--- a/Vulkan/glslang
+++ b/Vulkan/glslang
@@ -1 +1 @@
-Subproject commit cf571f7310f58e6eb4ea35600ef1401bc76db0d2
+Subproject commit e22e3473958e9bf3536f6c2133d66e5808816b78
diff --git a/appveyor.yml b/appveyor.yml
index a66316f069..c75759ea54 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -51,7 +51,7 @@ before_build:
- set PATH=%PATH%;%QTDIR%
- if not exist llvmlibs.7z appveyor DownloadFile "https://drive.google.com/uc?export=download&id=0B8A6NaxhQAGRY2k3Q2Yya05lcm8" -FileName llvmlibs.7z
- 7z x llvmlibs.7z -aos -o%APPVEYOR_BUILD_FOLDER% > null
- - if not exist vulkan.7z appveyor DownloadFile "https://drive.google.com/uc?export=download&id=0B8A6NaxhQAGRaHYxV3VOS2d0a0U" -FileName vulkan.7z
+ - if not exist vulkan.7z appveyor DownloadFile "https://drive.google.com/uc?export=download&id=1A2eOMmCO714i0U7J0qI4aEMKnuWl8l_R" -FileName vulkan.7z
- 7z x vulkan.7z -aos -o"%APPVEYOR_BUILD_FOLDER%\lib\%CONFIGURATION%-%PLATFORM%" > null
# scripts to run *after* solution is built and *before* automatic packaging occurs (web apps, NuGet packages, Azure Cloud Services)
diff --git a/bin/GuiConfigs/Darker Style by TheMitoSan.qss b/bin/GuiConfigs/Darker Style by TheMitoSan.qss
index e88dec68a0..7c5362d74b 100644
--- a/bin/GuiConfigs/Darker Style by TheMitoSan.qss
+++ b/bin/GuiConfigs/Darker Style by TheMitoSan.qss
@@ -68,13 +68,13 @@ QCheckBox::indicator {
margin-top: 0.0625em;
}
QCheckBox::indicator:checked {
- background-color: #FFF; /* Green */
+ background-color: #FFF; /* White */
}
QCheckBox::indicator:unchecked {
- background-color: #000; /* Red */
+ background-color: #000; /* Black */
}
QCheckBox::indicator::disabled {
- background-color: #af4949; /* Gray */
+ background-color: #af4949; /* Red */
}
/* Radio Buttons */
@@ -242,10 +242,10 @@ QToolButton::hover {
/* Set Theme UI colors */
QLabel#gamelist_icon_background_color {
- background-color: #262626;
+ color: transparent;
}
QLabel#gamelist_toolbar_icon_color {
- background-color: #252525;
+ color: #828790;
}
/* Set Windows Taskbar Thumbnail colors */
@@ -313,11 +313,11 @@ QLabel#memory_viewer_address_panel {
background-color: #131313;
}
QLabel#memory_viewer_hex_panel {
- color: #FFF; /* Font Color: Grey */
+ color: #FFF; /* Font Color: White */
background-color: #131313;
}
QLabel#memory_viewer_ascii_panel {
- color: #FFF; /* Font Color: Grey */
+ color: #FFF; /* Font Color: White */
background-color: #131313;
}
diff --git a/bin/GuiConfigs/Kuroi (Dark) by Ani.qss b/bin/GuiConfigs/Kuroi (Dark) by Ani.qss
index 814ca5687c..bfb2b3a788 100644
--- a/bin/GuiConfigs/Kuroi (Dark) by Ani.qss
+++ b/bin/GuiConfigs/Kuroi (Dark) by Ani.qss
@@ -241,10 +241,10 @@ QToolButton::hover {
/* Set Theme UI colors */
QLabel#gamelist_icon_background_color {
- background-color: #323232;
+ color: transparent;
}
QLabel#gamelist_toolbar_icon_color {
- background-color: #e3e3e3;
+ color: #828790;
}
/* Set Windows Taskbar Thumbnail colors */
diff --git a/bin/GuiConfigs/ModernBlue Theme by TheMitoSan.qss b/bin/GuiConfigs/ModernBlue Theme by TheMitoSan.qss
index 7907ea0e54..d1f5eaa222 100644
--- a/bin/GuiConfigs/ModernBlue Theme by TheMitoSan.qss
+++ b/bin/GuiConfigs/ModernBlue Theme by TheMitoSan.qss
@@ -239,10 +239,10 @@ QToolButton::hover {
/* Set Theme UI colors */
QLabel#gamelist_icon_background_color {
- background-color: #262626;
+ color: transparent;
}
QLabel#gamelist_toolbar_icon_color {
- background-color: #252525;
+ color: #828790;
}
/* Set Windows Taskbar Thumbnail colors */
diff --git a/rpcs3/Emu/Audio/XAudio2/XAudio27Thread.cpp b/rpcs3/Emu/Audio/XAudio2/XAudio27Thread.cpp
index f067810cee..36acee53bb 100644
--- a/rpcs3/Emu/Audio/XAudio2/XAudio27Thread.cpp
+++ b/rpcs3/Emu/Audio/XAudio2/XAudio27Thread.cpp
@@ -121,7 +121,7 @@ void XAudio2Thread::xa27_open()
return;
}
- s_tls_source_voice->SetVolume(g_cfg.audio.downmix_to_2ch ? 1.0 : 4.0);
+ s_tls_source_voice->SetVolume(g_cfg.audio.downmix_to_2ch ? 1.0f : 4.0f);
}
void XAudio2Thread::xa27_add(const void* src, int size)
diff --git a/rpcs3/Emu/Cell/Modules/cellGame.cpp b/rpcs3/Emu/Cell/Modules/cellGame.cpp
index 92f2d35ab2..0db464b3df 100644
--- a/rpcs3/Emu/Cell/Modules/cellGame.cpp
+++ b/rpcs3/Emu/Cell/Modules/cellGame.cpp
@@ -319,9 +319,9 @@ error_code cellGameDataCheck(u32 type, vm::cptr dirName, vm::ptr= 3)
+ if ((type - 1) >= 3 || (type != CELL_GAME_GAMETYPE_DISC && !dirName))
{
- return CELL_GAME_ERROR_PARAM;
+ return {CELL_GAME_ERROR_PARAM, type};
}
if (size)
diff --git a/rpcs3/Emu/Cell/Modules/cellPad.cpp b/rpcs3/Emu/Cell/Modules/cellPad.cpp
index 4c280113fb..592ce0fc2f 100644
--- a/rpcs3/Emu/Cell/Modules/cellPad.cpp
+++ b/rpcs3/Emu/Cell/Modules/cellPad.cpp
@@ -45,14 +45,15 @@ s32 cellPadClearBuf(u32 port_no)
if (port_no >= rinfo.max_connect)
return CELL_PAD_ERROR_INVALID_PARAMETER;
- if (port_no >= rinfo.now_connect)
- return CELL_PAD_ERROR_NO_DEVICE;
//Set 'm_buffer_cleared' to force a resend of everything
//might as well also reset everything in our pad 'buffer' to nothing as well
- auto& pads = handler->GetPads();
- auto pad = pads[port_no];
+ const auto& pads = handler->GetPads();
+ const auto pad = pads[port_no];
+
+ if (!(pad->m_port_status & CELL_PAD_STATUS_CONNECTED))
+ return CELL_PAD_ERROR_NO_DEVICE;
pad->m_buffer_cleared = true;
pad->m_analog_left_x = pad->m_analog_left_y = pad->m_analog_right_x = pad->m_analog_right_y = 128;
@@ -65,7 +66,7 @@ s32 cellPadClearBuf(u32 port_no)
//~399 on sensor y is a level non moving controller
pad->m_sensor_y = 399;
pad->m_sensor_x = pad->m_sensor_z = pad->m_sensor_g = 512;
-
+
return CELL_OK;
}
@@ -78,18 +79,17 @@ s32 cellPadGetData(u32 port_no, vm::ptr data)
if (!handler)
return CELL_PAD_ERROR_UNINITIALIZED;
- auto& pads = handler->GetPads();
-
const PadInfo& rinfo = handler->GetInfo();
if (port_no >= rinfo.max_connect)
return CELL_PAD_ERROR_INVALID_PARAMETER;
- //We have a choice here of NO_DEVICE or READ_FAILED...lets try no device for now
- if (port_no >= rinfo.now_connect)
- return CELL_PAD_ERROR_NO_DEVICE;
+ const auto& pads = handler->GetPads();
+ const auto pad = pads[port_no];
- auto pad = pads[port_no];
+ //We have a choice here of NO_DEVICE or READ_FAILED...lets try no device for now
+ if (!(pad->m_port_status & CELL_PAD_STATUS_CONNECTED))
+ return CELL_PAD_ERROR_NO_DEVICE;
u16 d1Initial, d2Initial;
d1Initial = pad->m_digital_1;
@@ -107,21 +107,21 @@ s32 cellPadGetData(u32 port_no, vm::ptr data)
switch (button.m_outKeyCode)
{
- case CELL_PAD_CTRL_LEFT:
+ case CELL_PAD_CTRL_LEFT:
if (pad->m_press_left != button.m_value) btnChanged = true;
pad->m_press_left = button.m_value;
break;
- case CELL_PAD_CTRL_DOWN:
+ case CELL_PAD_CTRL_DOWN:
if (pad->m_press_down != button.m_value) btnChanged = true;
- pad->m_press_down = button.m_value;
+ pad->m_press_down = button.m_value;
break;
- case CELL_PAD_CTRL_RIGHT:
+ case CELL_PAD_CTRL_RIGHT:
if (pad->m_press_right != button.m_value) btnChanged = true;
- pad->m_press_right = button.m_value;
+ pad->m_press_right = button.m_value;
break;
- case CELL_PAD_CTRL_UP:
+ case CELL_PAD_CTRL_UP:
if (pad->m_press_up != button.m_value) btnChanged = true;
- pad->m_press_up = button.m_value;
+ pad->m_press_up = button.m_value;
break;
//These arent pressure btns
case CELL_PAD_CTRL_R3:
@@ -144,9 +144,9 @@ s32 cellPadGetData(u32 port_no, vm::ptr data)
break;
case CELL_PAD_CTRL_CROSS:
if (pad->m_press_cross != button.m_value) btnChanged = true;
- pad->m_press_cross = button.m_value;
+ pad->m_press_cross = button.m_value;
break;
- case CELL_PAD_CTRL_CIRCLE:
+ case CELL_PAD_CTRL_CIRCLE:
if (pad->m_press_circle != button.m_value) btnChanged = true;
pad->m_press_circle = button.m_value;
break;
@@ -154,21 +154,21 @@ s32 cellPadGetData(u32 port_no, vm::ptr data)
if (pad->m_press_triangle != button.m_value) btnChanged = true;
pad->m_press_triangle = button.m_value;
break;
- case CELL_PAD_CTRL_R1:
+ case CELL_PAD_CTRL_R1:
if (pad->m_press_R1 != button.m_value) btnChanged = true;
- pad->m_press_R1 = button.m_value;
+ pad->m_press_R1 = button.m_value;
break;
- case CELL_PAD_CTRL_L1:
+ case CELL_PAD_CTRL_L1:
if (pad->m_press_L1 != button.m_value) btnChanged = true;
- pad->m_press_L1 = button.m_value;
+ pad->m_press_L1 = button.m_value;
break;
- case CELL_PAD_CTRL_R2:
+ case CELL_PAD_CTRL_R2:
if (pad->m_press_R2 != button.m_value) btnChanged = true;
- pad->m_press_R2 = button.m_value;
+ pad->m_press_R2 = button.m_value;
break;
- case CELL_PAD_CTRL_L2:
+ case CELL_PAD_CTRL_L2:
if (pad->m_press_L2 != button.m_value) btnChanged = true;
- pad->m_press_L2 = button.m_value;
+ pad->m_press_L2 = button.m_value;
break;
default: break;
}
@@ -186,21 +186,21 @@ s32 cellPadGetData(u32 port_no, vm::ptr data)
{
switch (stick.m_offset)
{
- case CELL_PAD_BTN_OFFSET_ANALOG_LEFT_X:
+ case CELL_PAD_BTN_OFFSET_ANALOG_LEFT_X:
if (pad->m_analog_left_x != stick.m_value) btnChanged = true;
- pad->m_analog_left_x = stick.m_value;
+ pad->m_analog_left_x = stick.m_value;
break;
- case CELL_PAD_BTN_OFFSET_ANALOG_LEFT_Y:
+ case CELL_PAD_BTN_OFFSET_ANALOG_LEFT_Y:
if (pad->m_analog_left_y != stick.m_value) btnChanged = true;
- pad->m_analog_left_y = stick.m_value;
+ pad->m_analog_left_y = stick.m_value;
break;
- case CELL_PAD_BTN_OFFSET_ANALOG_RIGHT_X:
+ case CELL_PAD_BTN_OFFSET_ANALOG_RIGHT_X:
if (pad->m_analog_right_x != stick.m_value) btnChanged = true;
- pad->m_analog_right_x = stick.m_value;
+ pad->m_analog_right_x = stick.m_value;
break;
- case CELL_PAD_BTN_OFFSET_ANALOG_RIGHT_Y:
+ case CELL_PAD_BTN_OFFSET_ANALOG_RIGHT_Y:
if (pad->m_analog_right_y != stick.m_value) btnChanged = true;
- pad->m_analog_right_y = stick.m_value;
+ pad->m_analog_right_y = stick.m_value;
break;
default: break;
}
@@ -235,7 +235,6 @@ s32 cellPadGetData(u32 port_no, vm::ptr data)
btnChanged = true;
}
-
// the real hardware only fills the buffer up to "len" elements (16 bit each)
if (pad->m_port_setting & CELL_PAD_SETTING_SENSOR_ON)
{
@@ -266,7 +265,7 @@ s32 cellPadGetData(u32 port_no, vm::ptr data)
}
pad->m_buffer_cleared = false;
-
+
// only update parts of the output struct depending on the controller setting
if (data->len > CELL_PAD_LEN_NO_CHANGE)
{
@@ -328,7 +327,7 @@ s32 cellPadPeriphGetInfo(vm::ptr info)
info->now_connect = rinfo.now_connect;
info->system_info = rinfo.system_info;
- auto& pads = handler->GetPads();
+ const auto& pads = handler->GetPads();
// TODO: Support other types of controllers
for (u32 i = 0; i < CELL_PAD_MAX_PORT_NUM; ++i)
@@ -337,6 +336,7 @@ s32 cellPadPeriphGetInfo(vm::ptr info)
break;
info->port_status[i] = pads[i]->m_port_status;
+ pads[i]->m_port_status &= ~CELL_PAD_STATUS_ASSIGN_CHANGES;
info->port_setting[i] = pads[i]->m_port_setting;
info->device_capability[i] = pads[i]->m_device_capability;
info->device_type[i] = pads[i]->m_device_type;
@@ -359,7 +359,11 @@ s32 cellPadPeriphGetData(u32 port_no, vm::ptr data)
if (port_no >= rinfo.max_connect)
return CELL_PAD_ERROR_INVALID_PARAMETER;
- if (port_no >= rinfo.now_connect)
+
+ const auto& pads = handler->GetPads();
+ const auto pad = pads[port_no];
+
+ if (!(pad->m_port_status & CELL_PAD_STATUS_CONNECTED))
return CELL_PAD_ERROR_NO_DEVICE;
// todo: support for 'unique' controllers, which goes in offsets 24+ in padData
@@ -386,7 +390,11 @@ s32 cellPadGetDataExtra(u32 port_no, vm::ptr device_type, vm::ptr= rinfo.max_connect)
return CELL_PAD_ERROR_INVALID_PARAMETER;
- if (port_no >= rinfo.now_connect)
+
+ const auto& pads = handler->GetPads();
+ const auto pad = pads[port_no];
+
+ if (!(pad->m_port_status & CELL_PAD_STATUS_CONNECTED))
return CELL_PAD_ERROR_NO_DEVICE;
// TODO: This is used just to get data from a BD/CEC remote,
@@ -414,7 +422,11 @@ s32 cellPadSetActDirect(u32 port_no, vm::ptr param)
if (port_no >= rinfo.max_connect)
return CELL_PAD_ERROR_INVALID_PARAMETER;
- if (port_no >= rinfo.now_connect)
+
+ const auto& pads = handler->GetPads();
+ const auto pad = pads[port_no];
+
+ if (!(pad->m_port_status & CELL_PAD_STATUS_CONNECTED))
return CELL_PAD_ERROR_NO_DEVICE;
handler->SetRumble(port_no, param->motor[1], param->motor[0] > 0);
@@ -438,7 +450,7 @@ s32 cellPadGetInfo(vm::ptr info)
info->now_connect = rinfo.now_connect;
info->system_info = rinfo.system_info;
- auto& pads = handler->GetPads();
+ const auto& pads = handler->GetPads();
for (u32 i=0; i info)
info->now_connect = rinfo.now_connect;
info->system_info = rinfo.system_info;
- auto& pads = handler->GetPads();
+ const auto& pads = handler->GetPads();
for (u32 i=0; i info)
if (port_no >= rinfo.max_connect)
return CELL_PAD_ERROR_INVALID_PARAMETER;
- if (port_no >= rinfo.now_connect)
- return CELL_PAD_ERROR_NO_DEVICE;
const auto& pads = handler->GetPads();
+ const auto pad = pads[port_no];
+
+ if (!(pad->m_port_status & CELL_PAD_STATUS_CONNECTED))
+ return CELL_PAD_ERROR_NO_DEVICE;
//Should return the same as device capability mask, psl1ght has it backwards in pad->h
- info->info[0] = pads[port_no]->m_device_capability;
+ info->info[0] = pad->m_device_capability;
return CELL_OK;
}
@@ -525,10 +539,12 @@ s32 cellPadSetPortSetting(u32 port_no, u32 port_setting)
if (port_no >= rinfo.max_connect)
return CELL_PAD_ERROR_INVALID_PARAMETER;
- auto& pads = handler->GetPads();
- pads[port_no]->m_port_setting = port_setting;
+ const auto& pads = handler->GetPads();
+ const auto pad = pads[port_no];
- if (port_no >= rinfo.now_connect)
+ pad->m_port_setting = port_setting;
+
+ if (!(pad->m_port_status & CELL_PAD_STATUS_CONNECTED))
return CELL_PAD_ERROR_NO_DEVICE;
return CELL_OK;
@@ -547,12 +563,14 @@ s32 cellPadInfoPressMode(u32 port_no)
if (port_no >= rinfo.max_connect)
return CELL_PAD_ERROR_INVALID_PARAMETER;
- if (port_no >= rinfo.now_connect)
- return CELL_PAD_ERROR_NO_DEVICE;
const auto& pads = handler->GetPads();
+ const auto pad = pads[port_no];
- return (pads[port_no]->m_device_capability & CELL_PAD_CAPABILITY_PRESS_MODE) > 0;
+ if (!(pad->m_port_status & CELL_PAD_STATUS_CONNECTED))
+ return CELL_PAD_ERROR_NO_DEVICE;
+
+ return (pad->m_device_capability & CELL_PAD_CAPABILITY_PRESS_MODE) > 0;
}
s32 cellPadInfoSensorMode(u32 port_no)
@@ -568,12 +586,14 @@ s32 cellPadInfoSensorMode(u32 port_no)
if (port_no >= rinfo.max_connect)
return CELL_PAD_ERROR_INVALID_PARAMETER;
- if (port_no >= rinfo.now_connect)
- return CELL_PAD_ERROR_NO_DEVICE;
const auto& pads = handler->GetPads();
+ const auto pad = pads[port_no];
- return (pads[port_no]->m_device_capability & CELL_PAD_CAPABILITY_SENSOR_MODE) > 0;
+ if (!(pad->m_port_status & CELL_PAD_STATUS_CONNECTED))
+ return CELL_PAD_ERROR_NO_DEVICE;
+
+ return (pad->m_device_capability & CELL_PAD_CAPABILITY_SENSOR_MODE) > 0;
}
s32 cellPadSetPressMode(u32 port_no, u32 mode)
@@ -592,15 +612,17 @@ s32 cellPadSetPressMode(u32 port_no, u32 mode)
if (port_no >= rinfo.max_connect)
return CELL_PAD_ERROR_INVALID_PARAMETER;
- if (port_no >= rinfo.now_connect)
- return CELL_PAD_ERROR_NO_DEVICE;
- auto& pads = handler->GetPads();
+ const auto& pads = handler->GetPads();
+ const auto pad = pads[port_no];
if (mode)
- pads[port_no]->m_port_setting |= CELL_PAD_SETTING_PRESS_ON;
+ pad->m_port_setting |= CELL_PAD_SETTING_PRESS_ON;
else
- pads[port_no]->m_port_setting &= ~CELL_PAD_SETTING_PRESS_ON;
+ pad->m_port_setting &= ~CELL_PAD_SETTING_PRESS_ON;
+
+ if (!(pad->m_port_status & CELL_PAD_STATUS_CONNECTED))
+ return CELL_PAD_ERROR_NO_DEVICE;
return CELL_OK;
}
@@ -621,15 +643,17 @@ s32 cellPadSetSensorMode(u32 port_no, u32 mode)
if (port_no >= rinfo.max_connect)
return CELL_PAD_ERROR_INVALID_PARAMETER;
- if (port_no >= rinfo.now_connect)
- return CELL_PAD_ERROR_NO_DEVICE;
- auto& pads = handler->GetPads();
+ const auto& pads = handler->GetPads();
+ const auto pad = pads[port_no];
if (mode)
- pads[port_no]->m_port_setting |= CELL_PAD_SETTING_SENSOR_ON;
+ pad->m_port_setting |= CELL_PAD_SETTING_SENSOR_ON;
else
- pads[port_no]->m_port_setting &= ~CELL_PAD_SETTING_SENSOR_ON;
+ pad->m_port_setting &= ~CELL_PAD_SETTING_SENSOR_ON;
+
+ if (!(pad->m_port_status & CELL_PAD_STATUS_CONNECTED))
+ return CELL_PAD_ERROR_NO_DEVICE;
return CELL_OK;
}
@@ -662,12 +686,16 @@ s32 cellPadLddGetPortNo(s32 handle)
{
sys_io.todo("cellPadLddGetPortNo(handle=%d)", handle);
+ if (handle < 0)
+ return CELL_PAD_ERROR_INVALID_PARAMETER;
+
const auto handler = fxm::get();
if (!handler)
return CELL_PAD_ERROR_UNINITIALIZED;
- return CELL_OK;
+ // CELL_OK would return port 0 (Nascar [BLUS30932] stopped looking for custom controllers after a few seconds, fixing normal input)
+ return CELL_PAD_ERROR_EBUSY;
}
s32 cellPadLddUnregisterController(s32 handle)
diff --git a/rpcs3/Emu/Cell/Modules/cellSaveData.cpp b/rpcs3/Emu/Cell/Modules/cellSaveData.cpp
index 18c8295725..1c3615aac9 100644
--- a/rpcs3/Emu/Cell/Modules/cellSaveData.cpp
+++ b/rpcs3/Emu/Cell/Modules/cellSaveData.cpp
@@ -152,7 +152,7 @@ static NEVER_INLINE s32 savedata_op(ppu_thread& ppu, u32 operation, u32 version,
if (fs::is_file(base_dir + entry.name + "/ICON0.PNG"))
{
fs::file icon = fs::file(base_dir + entry.name + "/ICON0.PNG");
- u32 iconSize = icon.size();
+ u64 iconSize = icon.size();
std::vector iconData;
icon.read(iconData, iconSize);
save_entry2.iconBuf = iconData;
diff --git a/rpcs3/Emu/Cell/Modules/sceNpTrophy.cpp b/rpcs3/Emu/Cell/Modules/sceNpTrophy.cpp
index 2a5abb8ba4..f7f1ee6112 100644
--- a/rpcs3/Emu/Cell/Modules/sceNpTrophy.cpp
+++ b/rpcs3/Emu/Cell/Modules/sceNpTrophy.cpp
@@ -521,7 +521,7 @@ error_code sceNpTrophyUnlockTrophy(u32 context, u32 handle, s32 trophyId, vm::pt
// Get icon for the notification.
std::string trophyIconPath = "/dev_hdd0/home/00000001/trophy/" + ctxt->trp_name + "/TROP" + padding + std::to_string(trophyId) + ".PNG";
fs::file trophyIconFile = fs::file(vfs::get(trophyIconPath));
- u32 iconSize = trophyIconFile.size();
+ size_t iconSize = trophyIconFile.size();
std::vector trophyIconData;
trophyIconFile.read(trophyIconData, iconSize);
diff --git a/rpcs3/Emu/Cell/SPUThread.cpp b/rpcs3/Emu/Cell/SPUThread.cpp
index 666586d8e9..c33b3a1442 100644
--- a/rpcs3/Emu/Cell/SPUThread.cpp
+++ b/rpcs3/Emu/Cell/SPUThread.cpp
@@ -1108,7 +1108,7 @@ bool SPUThread::get_ch_value(u32 ch, u32& out)
case SPU_RdSRR0:
{
out = srr0;
- break;
+ return true;
}
case SPU_RdInMbox:
{
@@ -1243,7 +1243,7 @@ bool SPUThread::set_ch_value(u32 ch, u32 value)
case SPU_WrSRR0:
{
srr0 = value;
- break;
+ return true;
}
case SPU_WrOutIntrMbox:
diff --git a/rpcs3/Emu/RSX/D3D12/D3D12CommonDecompiler.cpp b/rpcs3/Emu/RSX/D3D12/D3D12CommonDecompiler.cpp
index d844cfbaa0..a959dc4a60 100644
--- a/rpcs3/Emu/RSX/D3D12/D3D12CommonDecompiler.cpp
+++ b/rpcs3/Emu/RSX/D3D12/D3D12CommonDecompiler.cpp
@@ -83,7 +83,7 @@ std::string getFunctionImp(FUNCTION f)
case FUNCTION::FUNCTION_DFDY:
return "ddy($0)";
case FUNCTION::FUNCTION_TEXTURE_SAMPLE2D_DEPTH_RGBA:
- return "texture2DReconstruct($t.Sample($tsampler, $0.xy * $t_scale, texture_parameters[$_i].z))";
+ return "texture2DReconstruct($t.Sample($tsampler, $0.xy * $t_scale), texture_parameters[$_i].z)";
}
}
diff --git a/rpcs3/Emu/RSX/D3D12/D3D12GSRender.cpp b/rpcs3/Emu/RSX/D3D12/D3D12GSRender.cpp
index 275e611cd5..b1d3d6d729 100644
--- a/rpcs3/Emu/RSX/D3D12/D3D12GSRender.cpp
+++ b/rpcs3/Emu/RSX/D3D12/D3D12GSRender.cpp
@@ -467,8 +467,8 @@ void D3D12GSRender::end()
0.f,
(float)clip_w,
(float)clip_h,
- rsx::method_registers.clip_min(),
- rsx::method_registers.clip_max(),
+ 0.f,
+ 1.f,
};
get_current_resource_storage().command_list->RSSetViewports(1, &viewport);
diff --git a/rpcs3/Emu/RSX/D3D12/D3D12PipelineState.cpp b/rpcs3/Emu/RSX/D3D12/D3D12PipelineState.cpp
index fb90d1c609..c1b1ef7ab0 100644
--- a/rpcs3/Emu/RSX/D3D12/D3D12PipelineState.cpp
+++ b/rpcs3/Emu/RSX/D3D12/D3D12PipelineState.cpp
@@ -276,6 +276,7 @@ void D3D12GSRender::load_program()
D3D12_CONSERVATIVE_RASTERIZATION_MODE_OFF,
};
prop.Rasterization = CD3D12_RASTERIZER_DESC;
+ prop.Rasterization.DepthClipEnable = rsx::method_registers.depth_clip_enabled();
if (rsx::method_registers.cull_face_enabled())
{
diff --git a/rpcs3/Emu/RSX/D3D12/D3D12RenderTargetSets.cpp b/rpcs3/Emu/RSX/D3D12/D3D12RenderTargetSets.cpp
index 4db62cabec..bbea11ddb0 100644
--- a/rpcs3/Emu/RSX/D3D12/D3D12RenderTargetSets.cpp
+++ b/rpcs3/Emu/RSX/D3D12/D3D12RenderTargetSets.cpp
@@ -103,11 +103,15 @@ namespace
void D3D12GSRender::clear_surface(u32 arg)
{
+ if ((arg & 0xf3) == 0) return;
+
std::chrono::time_point start_duration = steady_clock::now();
std::chrono::time_point rtt_duration_start = steady_clock::now();
prepare_render_targets(get_current_resource_storage().command_list.Get());
+ if (!framebuffer_status_valid) return;
+
std::chrono::time_point rtt_duration_end = steady_clock::now();
m_timers.prepare_rtt_duration += std::chrono::duration_cast(rtt_duration_end - rtt_duration_start).count();
@@ -186,6 +190,8 @@ void D3D12GSRender::prepare_render_targets(ID3D12GraphicsCommandList *copycmdlis
get_color_surface_addresses(), get_zeta_surface_address(),
m_device.Get(), clear_color, 1.f, 0);
+ framebuffer_status_valid = true;
+
// write descriptors
DXGI_FORMAT dxgi_format = get_color_surface_format(rsx::method_registers.surface_color());
D3D12_RENDER_TARGET_VIEW_DESC rtt_view_desc = {};
diff --git a/rpcs3/Emu/RSX/GL/GLGSRender.cpp b/rpcs3/Emu/RSX/GL/GLGSRender.cpp
index d021a76052..7417ba8e81 100644
--- a/rpcs3/Emu/RSX/GL/GLGSRender.cpp
+++ b/rpcs3/Emu/RSX/GL/GLGSRender.cpp
@@ -1044,16 +1044,6 @@ void GLGSRender::update_draw_state()
if (gl_state.enable(rsx::method_registers.depth_test_enabled(), GL_DEPTH_TEST))
{
gl_state.depth_func(comparison_op(rsx::method_registers.depth_func()));
-
- float range_near = rsx::method_registers.clip_min();
- float range_far = rsx::method_registers.clip_max();
-
- //Workaround to preserve depth precision but respect z direction
- //Ni no Kuni sets a very restricted z range (0.9x - 1.) and depth reads / tests are broken
- if (range_near <= range_far)
- gl_state.depth_range(0.f, 1.f);
- else
- gl_state.depth_range(1.f, 0.f);
}
if (glDepthBoundsEXT && (gl_state.enable(rsx::method_registers.depth_bounds_test_enabled(), GL_DEPTH_BOUNDS_TEST_EXT)))
diff --git a/rpcs3/Emu/RSX/RSXThread.cpp b/rpcs3/Emu/RSX/RSXThread.cpp
index fd2b2189c5..bb65cb1bb4 100644
--- a/rpcs3/Emu/RSX/RSXThread.cpp
+++ b/rpcs3/Emu/RSX/RSXThread.cpp
@@ -626,6 +626,11 @@ namespace rsx
unaligned_command = true;
}
+ // Not sure if this is worth trying to fix, but if it happens, its bad
+ // so logging it until its reported
+ if (internal_get < put && ((internal_get + (count + 1) * 4) > put))
+ LOG_ERROR(RSX, "Get pointer jumping over put pointer! This is bad!");
+
for (u32 i = 0; i < count; i++)
{
u32 reg = ((cmd & RSX_METHOD_NON_INCREMENT_CMD_MASK) == RSX_METHOD_NON_INCREMENT_CMD) ? first_cmd : first_cmd + i;
@@ -790,8 +795,14 @@ namespace rsx
if (flip_y) scale_y *= -1;
if (flip_y) offset_y *= -1;
- float scale_z = rsx::method_registers.viewport_scale_z();
- float offset_z = rsx::method_registers.viewport_offset_z();
+ float clip_min = rsx::method_registers.clip_min();
+ float clip_max = rsx::method_registers.clip_max();
+
+ float z_clip_scale = (clip_max + clip_min) == 0.f ? 1.f : (clip_max + clip_min);
+ float z_offset_scale = (clip_max - clip_min) == 0.f ? 1.f : (clip_max - clip_min);
+
+ float scale_z = rsx::method_registers.viewport_scale_z() / z_clip_scale;
+ float offset_z = rsx::method_registers.viewport_offset_z() / z_offset_scale;
float one = 1.f;
stream_vector(buffer, (u32&)scale_x, 0, 0, (u32&)offset_x);
diff --git a/rpcs3/Emu/RSX/VK/VKHelpers.h b/rpcs3/Emu/RSX/VK/VKHelpers.h
index 8ad89f7ccc..7b18ae35b0 100644
--- a/rpcs3/Emu/RSX/VK/VKHelpers.h
+++ b/rpcs3/Emu/RSX/VK/VKHelpers.h
@@ -3,6 +3,7 @@
#include "stdafx.h"
#include
#include
+#include
#include
#include
#include
@@ -1135,6 +1136,30 @@ namespace vk
}
};
+ class supported_extensions
+ {
+ private:
+ std::vector m_vk_exts;
+
+ public:
+
+ supported_extensions()
+ {
+ uint32_t count;
+ if (vkEnumerateInstanceExtensionProperties(nullptr, &count, nullptr) != VK_SUCCESS)
+ return;
+
+ m_vk_exts.resize(count);
+ vkEnumerateInstanceExtensionProperties(nullptr, &count, m_vk_exts.data());
+ }
+
+ bool is_supported(const char *ext)
+ {
+ return std::any_of(m_vk_exts.cbegin(), m_vk_exts.cend(),
+ [&](const VkExtensionProperties& p) { return std::strcmp(p.extensionName, ext) == 0; });
+ }
+ };
+
class context
{
private:
@@ -1216,22 +1241,36 @@ namespace vk
app.apiVersion = VK_MAKE_VERSION(1, 0, 0);
//Set up instance information
- const char *requested_extensions[] =
- {
- VK_KHR_SURFACE_EXTENSION_NAME,
-#ifdef _WIN32
- VK_KHR_WIN32_SURFACE_EXTENSION_NAME,
-#else
- VK_KHR_XLIB_SURFACE_EXTENSION_NAME,
-#endif
-#ifdef VK_USE_PLATFORM_WAYLAND_KHR
- VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME,
-#endif
- VK_EXT_DEBUG_REPORT_EXTENSION_NAME,
- };
+ std::vector extensions;
std::vector layers;
+ extensions.push_back(VK_KHR_SURFACE_EXTENSION_NAME);
+ extensions.push_back(VK_EXT_DEBUG_REPORT_EXTENSION_NAME);
+#ifdef _WIN32
+ extensions.push_back(VK_KHR_WIN32_SURFACE_EXTENSION_NAME);
+#else
+ supported_extensions support;
+ bool found_surface_ext = false;
+ if (support.is_supported(VK_KHR_XLIB_SURFACE_EXTENSION_NAME))
+ {
+ extensions.push_back(VK_KHR_XLIB_SURFACE_EXTENSION_NAME);
+ found_surface_ext = true;
+ }
+#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+ if (support.is_supported(VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME))
+ {
+ extensions.push_back(VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME);
+ found_surface_ext = true;
+ }
+#endif
+ if (!found_surface_ext)
+ {
+ LOG_ERROR(RSX, "Could not find a supported Vulkan surface extension");
+ return 0;
+ }
+#endif
+
if (!fast && g_cfg.video.debug_output)
layers.push_back("VK_LAYER_LUNARG_standard_validation");
@@ -1240,8 +1279,8 @@ namespace vk
instance_info.pApplicationInfo = &app;
instance_info.enabledLayerCount = static_cast(layers.size());
instance_info.ppEnabledLayerNames = layers.data();
- instance_info.enabledExtensionCount = fast? 0: sizeof(requested_extensions)/sizeof(char*);
- instance_info.ppEnabledExtensionNames = fast? nullptr: requested_extensions;
+ instance_info.enabledExtensionCount = fast? 0: static_cast(extensions.size());
+ instance_info.ppEnabledExtensionNames = fast? nullptr: extensions.data();
VkInstance instance;
if (vkCreateInstance(&instance_info, nullptr, &instance) != VK_SUCCESS)
diff --git a/rpcs3/Emu/RSX/rsx_cache.h b/rpcs3/Emu/RSX/rsx_cache.h
index 29144cea19..19369aee31 100644
--- a/rpcs3/Emu/RSX/rsx_cache.h
+++ b/rpcs3/Emu/RSX/rsx_cache.h
@@ -290,6 +290,11 @@ namespace rsx
template
void load(Args&& ...args)
{
+ if (g_cfg.video.disable_on_disk_shader_cache)
+ {
+ return;
+ }
+
std::string directory_path = root_path + "/pipelines/" + pipeline_class_name;
if (!fs::is_dir(directory_path))
@@ -378,6 +383,11 @@ namespace rsx
void store(pipeline_storage_type &pipeline, RSXVertexProgram &vp, RSXFragmentProgram &fp)
{
+ if (g_cfg.video.disable_on_disk_shader_cache)
+ {
+ return;
+ }
+
pipeline_data data = pack(pipeline, vp, fp);
std::string fp_name = root_path + "/raw/" + fmt::format("%llX.fp", data.fragment_program_hash);
std::string vp_name = root_path + "/raw/" + fmt::format("%llX.vp", data.vertex_program_hash);
diff --git a/rpcs3/Emu/RSX/rsx_decode.h b/rpcs3/Emu/RSX/rsx_decode.h
index 4b96fc2637..89f64451d7 100644
--- a/rpcs3/Emu/RSX/rsx_decode.h
+++ b/rpcs3/Emu/RSX/rsx_decode.h
@@ -710,20 +710,34 @@ struct registers_decoder
union
{
u32 raw_value;
+ bitfield_decoder_t<0, 4> depth_clip_enabled;
bitfield_decoder_t<4, 4> depth_clamp_enabled;
+ bitfield_decoder_t<8, 4> depth_clip_ignore_w;
} m_data;
public:
decoded_type(u32 raw_value) { m_data.raw_value = raw_value; }
+ bool depth_clip_enabled() const
+ {
+ return bool(m_data.depth_clip_enabled);
+ }
+
bool depth_clamp_enabled() const
{
return bool(m_data.depth_clamp_enabled);
}
+
+ bool depth_clip_ignore_w() const
+ {
+ return bool(m_data.depth_clip_ignore_w);
+ }
};
static std::string dump(decoded_type &&decoded_values)
{
- return "Depth: clamp " + print_boolean(decoded_values.depth_clamp_enabled());
+ return "Depth: clip_enabled " + print_boolean(decoded_values.depth_clip_enabled()) +
+ " clamp " + print_boolean(decoded_values.depth_clamp_enabled()) +
+ " ignore_w " + print_boolean(decoded_values.depth_clip_ignore_w());
}
};
@@ -4064,21 +4078,23 @@ struct registers_decoder
public:
decoded_type(u32 raw_value) { m_data.raw_value = raw_value; }
- u16 x() const
+ // x and y given as 16 bit fixed point
+
+ f32 x() const
{
- return m_data.x;
+ return m_data.x / 16.f;
}
- u16 y() const
+ f32 y() const
{
- return m_data.y;
+ return m_data.y / 16.f;
}
};
static std::string dump(decoded_type &&decoded_values)
{
- return "NV3089: in x = " + std::to_string(decoded_values.x() / 16.f) +
- " y = " + std::to_string(decoded_values.y() / 16.f);
+ return "NV3089: in x = " + std::to_string(decoded_values.x()) +
+ " y = " + std::to_string(decoded_values.y());
}
};
diff --git a/rpcs3/Emu/RSX/rsx_methods.cpp b/rpcs3/Emu/RSX/rsx_methods.cpp
index 197e474d7b..9cd69c8633 100644
--- a/rpcs3/Emu/RSX/rsx_methods.cpp
+++ b/rpcs3/Emu/RSX/rsx_methods.cpp
@@ -576,8 +576,8 @@ namespace rsx
const blit_engine::transfer_interpolator in_inter = method_registers.blit_engine_input_inter();
const rsx::blit_engine::transfer_source_format src_color_format = method_registers.blit_engine_src_color_format();
- const f32 in_x = method_registers.blit_engine_in_x();
- const f32 in_y = method_registers.blit_engine_in_y();
+ const f32 in_x = std::ceil(method_registers.blit_engine_in_x());
+ const f32 in_y = std::ceil(method_registers.blit_engine_in_y());
//Clipping
//Validate that clipping rect will fit onto both src and dst regions
@@ -855,7 +855,9 @@ namespace rsx
pixels_src = temp2.get();
}
- u8 sw_width_log2 = method_registers.nv309e_sw_width_log2();
+ // It looks like rsx may ignore the requested swizzle size and just always
+ // round up to nearest power of 2
+ /*u8 sw_width_log2 = method_registers.nv309e_sw_width_log2();
u8 sw_height_log2 = method_registers.nv309e_sw_height_log2();
// 0 indicates height of 1 pixel
@@ -864,31 +866,31 @@ namespace rsx
// swizzle based on destination size
u16 sw_width = 1 << sw_width_log2;
u16 sw_height = 1 << sw_height_log2;
+ */
+
+ u32 sw_width = next_pow2(out_w);
+ u32 sw_height = next_pow2(out_h);
temp2.reset(new u8[out_bpp * sw_width * sw_height]);
u8* linear_pixels = pixels_src;
u8* swizzled_pixels = temp2.get();
- // restrict output to size of swizzle
- const u16 sw_in_w = std::min(out_w, sw_width);
- const u16 sw_in_h = std::min(out_h, sw_height);
-
- // Check and pad texture out if we are given non square texture for swizzle to be correct
- if (sw_width != sw_in_w || sw_height != sw_in_h)
+ // Check and pad texture out if we are given non power of 2 output
+ if (sw_width != out_w || sw_height != out_h)
{
sw_temp.reset(new u8[out_bpp * sw_width * sw_height]);
switch (out_bpp)
{
case 1:
- pad_texture(linear_pixels, sw_temp.get(), sw_in_w, sw_in_h, sw_width, sw_height);
+ pad_texture(linear_pixels, sw_temp.get(), out_w, out_h, sw_width, sw_height);
break;
case 2:
- pad_texture(linear_pixels, sw_temp.get(), sw_in_w, sw_in_h, sw_width, sw_height);
+ pad_texture(linear_pixels, sw_temp.get(), out_w, out_h, sw_width, sw_height);
break;
case 4:
- pad_texture(linear_pixels, sw_temp.get(), sw_in_w, sw_in_h, sw_width, sw_height);
+ pad_texture(linear_pixels, sw_temp.get(), out_w, out_h, sw_width, sw_height);
break;
}
@@ -1157,6 +1159,7 @@ namespace rsx
// Stencil bits init to 00 - Tested with NPEB90184 (never sets the depth_stencil clear values but uses stencil test)
registers[NV4097_SET_ZSTENCIL_CLEAR_VALUE] = 0xffffff00;
+ registers[NV4097_SET_ZMIN_MAX_CONTROL] = 1;
// CELL_GCM_SURFACE_A8R8G8B8, CELL_GCM_SURFACE_Z24S8 and CELL_GCM_SURFACE_CENTER_1
registers[NV4097_SET_SURFACE_FORMAT] = (8 << 0) | (2 << 5) | (0 << 12) | (1 << 16) | (1 << 24);
diff --git a/rpcs3/Emu/RSX/rsx_methods.h b/rpcs3/Emu/RSX/rsx_methods.h
index 1d9b8b0197..0969f9c349 100644
--- a/rpcs3/Emu/RSX/rsx_methods.h
+++ b/rpcs3/Emu/RSX/rsx_methods.h
@@ -387,24 +387,12 @@ namespace rsx
f32 clip_min() const
{
- f32 depth_min = decode().clip_min();
-
- //Clamp to [0, 1]
- if (depth_min < 0.f) return 0.f;
- if (depth_min > 1.f) return 1.f;
-
- return depth_min;
+ return decode().clip_min();
}
f32 clip_max() const
{
- f32 depth_max = decode().clip_max();
-
- //Clamp to [0, 1]
- if (depth_max < 0.f) return 0.f;
- if (depth_max > 1.f) return 1.f;
-
- return depth_max;
+ return decode().clip_max();
}
bool logic_op_enabled() const
@@ -1206,6 +1194,16 @@ namespace rsx
{
return decode().depth_clamp_enabled();
}
+
+ bool depth_clip_enabled()
+ {
+ return decode().depth_clip_enabled();
+ }
+
+ bool depth_clip_ignore_w()
+ {
+ return decode().depth_clip_ignore_w();
+ }
};
extern rsx_state method_registers;
diff --git a/rpcs3/Emu/RSX/rsx_utils.h b/rpcs3/Emu/RSX/rsx_utils.h
index 408a803801..1a09e211ba 100644
--- a/rpcs3/Emu/RSX/rsx_utils.h
+++ b/rpcs3/Emu/RSX/rsx_utils.h
@@ -67,6 +67,13 @@ namespace rsx
return value <= 1 ? 0 : ::cntlz32((value - 1) << 1, true) ^ 31;
}
+ static inline u32 next_pow2(u32 x)
+ {
+ if (x <= 2) return x;
+
+ return (1ULL << 32) >> ::cntlz32(x - 1, true);
+ }
+
/* Note: What the ps3 calls swizzling in this case is actually z-ordering / morton ordering of pixels
* - Input can be swizzled or linear, bool flag handles conversion to and from
* - It will handle any width and height that are a power of 2, square or non square
diff --git a/rpcs3/Emu/System.h b/rpcs3/Emu/System.h
index 769dedd866..91c1361a41 100644
--- a/rpcs3/Emu/System.h
+++ b/rpcs3/Emu/System.h
@@ -343,7 +343,8 @@ struct cfg_root : cfg::node
cfg::_bool disable_zcull_queries{this, "Disable ZCull Occlusion Queries", false};
cfg::_bool disable_vertex_cache{this, "Disable Vertex Cache", false};
cfg::_bool frame_skip_enabled{this, "Enable Frame Skip", false};
- cfg::_bool force_cpu_blit_processing{this, "Force CPU Blit", false}; //Debugging option
+ cfg::_bool force_cpu_blit_processing{this, "Force CPU Blit", false}; // Debugging option
+ cfg::_bool disable_on_disk_shader_cache{this, "Disable On-Disk Shader Cache", false};
cfg::_int<1, 8> consequtive_frames_to_draw{this, "Consecutive Frames To Draw", 1};
cfg::_int<1, 8> consequtive_frames_to_skip{this, "Consecutive Frames To Skip", 1};
cfg::_int<50, 800> resolution_scale_percent{this, "Resolution Scale", 100};
diff --git a/rpcs3/Json/tooltips.json b/rpcs3/Json/tooltips.json
index 725aa1cea8..b65247f7bf 100644
--- a/rpcs3/Json/tooltips.json
+++ b/rpcs3/Json/tooltips.json
@@ -46,7 +46,8 @@
"debugOverlay": "Provides a graphical overlay of various debugging information.\nIf unsure, don't use this option.",
"logProg": "Dump game shaders to file. Only useful to developers.\nIf unsure, don't use this option.",
"disableOcclusionQueries": "Disables running occlusion queries. Minor to moderate performance boost.\nMight introduce issues with broken occlusion e.g missing geometry and extreme pop-in.",
- "forceCpuBlitEmulation": "Forces emulation of all blit and image manipulation operations on the CPU.\nRequires 'Write Color Buffers' option to also be enabled in most cases to avoid missing graphics.\nSignificantly degrades performance but is more accurate in some cases.\nThis setting overrides the 'GPU texture scaling' option."
+ "forceCpuBlitEmulation": "Forces emulation of all blit and image manipulation operations on the CPU.\nRequires 'Write Color Buffers' option to also be enabled in most cases to avoid missing graphics.\nSignificantly degrades performance but is more accurate in some cases.\nThis setting overrides the 'GPU texture scaling' option.",
+ "disableOnDiskShaderCache": "Disables the loading and saving of shaders from and to the shader cache in the data directory."
},
"emulator": {
"gui": {
diff --git a/rpcs3/ds4_pad_handler.cpp b/rpcs3/ds4_pad_handler.cpp
index 97ef7e84f7..8504977e56 100644
--- a/rpcs3/ds4_pad_handler.cpp
+++ b/rpcs3/ds4_pad_handler.cpp
@@ -789,7 +789,7 @@ bool ds4_pad_handler::bindPadToDevice(std::shared_ptr pad, const std::strin
pad->Init
(
- CELL_PAD_STATUS_CONNECTED | CELL_PAD_STATUS_ASSIGN_CHANGES,
+ CELL_PAD_STATUS_DISCONNECTED,
CELL_PAD_SETTING_PRESS_OFF | CELL_PAD_SETTING_SENSOR_OFF,
CELL_PAD_CAPABILITY_PS3_CONFORMITY | CELL_PAD_CAPABILITY_PRESS_MODE | CELL_PAD_CAPABILITY_HP_ANALOG_STICK | CELL_PAD_CAPABILITY_ACTUATOR | CELL_PAD_CAPABILITY_SENSOR_MODE,
CELL_PAD_DEV_TYPE_STANDARD
@@ -855,7 +855,7 @@ void ds4_pad_handler::ThreadProc()
}
hid_set_nonblocking(dev, 1);
m_dev->hidDevice = dev;
- thepad->m_port_status = CELL_PAD_STATUS_CONNECTED|CELL_PAD_STATUS_ASSIGN_CHANGES;
+ thepad->m_port_status = CELL_PAD_STATUS_CONNECTED | CELL_PAD_STATUS_ASSIGN_CHANGES;
if (!m_dev->hasCalibData)
m_dev->hasCalibData = GetCalibrationData(m_dev);
}
@@ -868,13 +868,14 @@ void ds4_pad_handler::ThreadProc()
last_connection_status[i] = false;
connected--;
}
- thepad->m_port_status = CELL_PAD_STATUS_DISCONNECTED|CELL_PAD_STATUS_ASSIGN_CHANGES;
+ thepad->m_port_status = CELL_PAD_STATUS_DISCONNECTED | CELL_PAD_STATUS_ASSIGN_CHANGES;
continue;
}
}
else if (last_connection_status[i] == false)
{
LOG_NOTICE(HLE, "DS4 device %d connected", i);
+ thepad->m_port_status = CELL_PAD_STATUS_CONNECTED | CELL_PAD_STATUS_ASSIGN_CHANGES;
last_connection_status[i] = true;
connected++;
}
diff --git a/rpcs3/evdev_joystick_handler.cpp b/rpcs3/evdev_joystick_handler.cpp
index 242423a5af..e3541ac4fb 100644
--- a/rpcs3/evdev_joystick_handler.cpp
+++ b/rpcs3/evdev_joystick_handler.cpp
@@ -113,7 +113,7 @@ bool evdev_joystick_handler::Init()
return true;
}
-bool evdev_joystick_handler::update_device(EvdevDevice& device, bool use_cell)
+bool evdev_joystick_handler::update_device(EvdevDevice& device)
{
std::shared_ptr pad = device.pad;
const auto& path = device.path;
@@ -125,19 +125,12 @@ bool evdev_joystick_handler::update_device(EvdevDevice& device, bool use_cell)
{
if (was_connected)
{
- // It was disconnected.
- if (use_cell)
- pad->m_port_status |= CELL_PAD_STATUS_ASSIGN_CHANGES;
-
int fd = libevdev_get_fd(dev);
libevdev_free(dev);
close(fd);
dev = nullptr;
}
- if (use_cell)
- pad->m_port_status &= ~CELL_PAD_STATUS_CONNECTED;
-
LOG_ERROR(GENERAL, "Joystick %s is not present or accessible [previous status: %d]", path.c_str(), was_connected ? 1 : 0);
return false;
}
@@ -161,22 +154,14 @@ bool evdev_joystick_handler::update_device(EvdevDevice& device, bool use_cell)
}
LOG_NOTICE(GENERAL, "Opened joystick: '%s' at %s (fd %d)", libevdev_get_name(dev), path, fd);
-
- if (use_cell)
- {
- // Connection status changed from disconnected to connected.
- pad->m_port_status |= CELL_PAD_STATUS_ASSIGN_CHANGES;
- pad->m_port_status |= CELL_PAD_STATUS_CONNECTED;
- }
-
return true;
}
-void evdev_joystick_handler::update_devs(bool use_cell)
+void evdev_joystick_handler::update_devs()
{
for (auto& device : devices)
{
- update_device(device, use_cell);
+ update_device(device);
}
}
@@ -252,7 +237,7 @@ evdev_joystick_handler::EvdevDevice* evdev_joystick_handler::get_device(const st
EvdevDevice& dev = devices[m_pad_index];
// Check if our device is connected
- if (!update_device(dev, false))
+ if (!update_device(dev))
return nullptr;
return &dev;
@@ -692,7 +677,10 @@ void evdev_joystick_handler::ThreadProc()
{
if (last_connection_status[padnum] == true)
{
+ // It was disconnected.
LOG_ERROR(HLE, "evdev device %d disconnected", padnum);
+ pad->m_port_status &= ~CELL_PAD_STATUS_CONNECTED;
+ pad->m_port_status |= CELL_PAD_STATUS_ASSIGN_CHANGES;
last_connection_status[padnum] = false;
connected--;
}
@@ -702,7 +690,10 @@ void evdev_joystick_handler::ThreadProc()
if (last_connection_status[padnum] == false)
{
+ // Connection status changed from disconnected to connected.
LOG_ERROR(HLE, "evdev device %d reconnected", padnum);
+ pad->m_port_status |= CELL_PAD_STATUS_CONNECTED;
+ pad->m_port_status |= CELL_PAD_STATUS_ASSIGN_CHANGES;
last_connection_status[padnum] = true;
connected++;
}
@@ -915,7 +906,7 @@ bool evdev_joystick_handler::bindPadToDevice(std::shared_ptr pad, const std
pad->Init
(
- CELL_PAD_STATUS_CONNECTED | CELL_PAD_STATUS_ASSIGN_CHANGES,
+ CELL_PAD_STATUS_DISCONNECTED,
CELL_PAD_SETTING_PRESS_OFF | CELL_PAD_SETTING_SENSOR_OFF,
CELL_PAD_CAPABILITY_PS3_CONFORMITY | CELL_PAD_CAPABILITY_PRESS_MODE | CELL_PAD_CAPABILITY_HP_ANALOG_STICK | CELL_PAD_CAPABILITY_ACTUATOR | CELL_PAD_CAPABILITY_SENSOR_MODE,
CELL_PAD_DEV_TYPE_STANDARD
diff --git a/rpcs3/evdev_joystick_handler.h b/rpcs3/evdev_joystick_handler.h
index 02515d35e4..1ec6ce20aa 100644
--- a/rpcs3/evdev_joystick_handler.h
+++ b/rpcs3/evdev_joystick_handler.h
@@ -341,8 +341,8 @@ public:
private:
void TranslateButtonPress(u64 keyCode, bool& pressed, u16& value, bool ignore_threshold = false) override;
EvdevDevice* get_device(const std::string& device);
- bool update_device(EvdevDevice& device, bool use_cell = true);
- void update_devs(bool use_cell = true);
+ bool update_device(EvdevDevice& device);
+ void update_devs();
int add_device(const std::string& device, bool in_settings = false);
int GetButtonInfo(const input_event& evt, const EvdevDevice& device, int& button_code);
std::unordered_map> GetButtonValues(const EvdevDevice& device);
diff --git a/rpcs3/keyboard_pad_handler.cpp b/rpcs3/keyboard_pad_handler.cpp
index 954aaf6fea..6f8e9ddf13 100644
--- a/rpcs3/keyboard_pad_handler.cpp
+++ b/rpcs3/keyboard_pad_handler.cpp
@@ -1,6 +1,7 @@
#include "keyboard_pad_handler.h"
#include
+#include
inline std::string sstr(const QString& _in) { return _in.toStdString(); }
constexpr auto qstr = QString::fromStdString;
@@ -398,7 +399,7 @@ bool keyboard_pad_handler::bindPadToDevice(std::shared_ptr pad, const std::
//Fixed assign change, default is both sensor and press off
pad->Init
(
- CELL_PAD_STATUS_CONNECTED | CELL_PAD_STATUS_ASSIGN_CHANGES,
+ CELL_PAD_STATUS_DISCONNECTED,
CELL_PAD_SETTING_PRESS_OFF | CELL_PAD_SETTING_SENSOR_OFF,
CELL_PAD_CAPABILITY_PS3_CONFORMITY | CELL_PAD_CAPABILITY_PRESS_MODE | CELL_PAD_CAPABILITY_HP_ANALOG_STICK | CELL_PAD_CAPABILITY_ACTUATOR | CELL_PAD_CAPABILITY_SENSOR_MODE,
CELL_PAD_DEV_TYPE_STANDARD
@@ -437,11 +438,21 @@ bool keyboard_pad_handler::bindPadToDevice(std::shared_ptr pad, const std::
pad->m_vibrateMotors.emplace_back(false, 0);
bindings.push_back(pad);
- connected++;
return true;
}
void keyboard_pad_handler::ThreadProc()
{
+ for (int i = 0; i < bindings.size(); i++)
+ {
+ if (last_connection_status[i] == false)
+ {
+ //QThread::msleep(100); // Hack Simpsons. It calls a seemingly useless cellPadGetInfo at boot that would swallow the first CELL_PAD_STATUS_ASSIGN_CHANGES otherwise
+ bindings[i]->m_port_status |= CELL_PAD_STATUS_CONNECTED;
+ bindings[i]->m_port_status |= CELL_PAD_STATUS_ASSIGN_CHANGES;
+ last_connection_status[i] = true;
+ connected++;
+ }
+ }
}
diff --git a/rpcs3/main.cpp b/rpcs3/main.cpp
index beaee47a43..7143f5b689 100644
--- a/rpcs3/main.cpp
+++ b/rpcs3/main.cpp
@@ -112,7 +112,7 @@ int main(int argc, char** argv)
{
argv.emplace_back();
- for (std::size_t i = 1; i < args.length(); i++)
+ for (int i = 1; i < args.length(); i++)
{
argv.emplace_back(args[i].toStdString());
}
diff --git a/rpcs3/mm_joystick_handler.cpp b/rpcs3/mm_joystick_handler.cpp
index 9f74a4c9ce..fcbc25dcba 100644
--- a/rpcs3/mm_joystick_handler.cpp
+++ b/rpcs3/mm_joystick_handler.cpp
@@ -144,7 +144,7 @@ bool mm_joystick_handler::bindPadToDevice(std::shared_ptr pad, const std::s
pad->Init
(
- CELL_PAD_STATUS_CONNECTED | CELL_PAD_STATUS_ASSIGN_CHANGES,
+ CELL_PAD_STATUS_DISCONNECTED,
CELL_PAD_SETTING_PRESS_OFF | CELL_PAD_SETTING_SENSOR_OFF,
CELL_PAD_CAPABILITY_PS3_CONFORMITY | CELL_PAD_CAPABILITY_PRESS_MODE | CELL_PAD_CAPABILITY_HP_ANALOG_STICK | CELL_PAD_CAPABILITY_ACTUATOR | CELL_PAD_CAPABILITY_SENSOR_MODE,
CELL_PAD_DEV_TYPE_STANDARD
diff --git a/rpcs3/rpcs3.vcxproj b/rpcs3/rpcs3.vcxproj
index a1a18ebc2e..b55fde93fe 100644
--- a/rpcs3/rpcs3.vcxproj
+++ b/rpcs3/rpcs3.vcxproj
@@ -431,6 +431,11 @@
true
true
+
+ true
+ true
+ true
+
true
true
@@ -571,6 +576,11 @@
true
true
+
+ true
+ true
+ true
+
true
true
@@ -721,6 +731,11 @@
true
true
+
+ true
+ true
+ true
+
true
true
@@ -861,6 +876,11 @@
true
true
+
+ true
+ true
+ true
+
true
true
@@ -1413,7 +1433,24 @@
-
+
+ $(QTDIR)\bin\moc.exe;%(FullPath)
+ Moc%27ing register_editor_dialog.h...
+ .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp
+ "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB "-DBRANCH=$(BRANCH)\." -DLLVM_AVAILABLE -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras"
+ $(QTDIR)\bin\moc.exe;%(FullPath)
+ Moc%27ing register_editor_dialog.h...
+ .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp
+ "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras"
+ $(QTDIR)\bin\moc.exe;%(FullPath)
+ Moc%27ing register_editor_dialog.h...
+ .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp
+ "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras"
+ $(QTDIR)\bin\moc.exe;%(FullPath)
+ Moc%27ing register_editor_dialog.h...
+ .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp
+ "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras"
+
$(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath)
Moc%27ing save_data_info_dialog.h...
diff --git a/rpcs3/rpcs3.vcxproj.filters b/rpcs3/rpcs3.vcxproj.filters
index 87a76c0905..25d3f4565b 100644
--- a/rpcs3/rpcs3.vcxproj.filters
+++ b/rpcs3/rpcs3.vcxproj.filters
@@ -587,6 +587,18 @@
Gui\misc dialogs
+
+ Generated Files\Release - LLVM
+
+
+ Generated Files\Debug
+
+
+ Generated Files\Release
+
+
+ Generated Files\Debug - LLVM
+
@@ -649,9 +661,6 @@
Gui\dev tools
-
- Gui\debugger
-
Gui\debugger
@@ -789,6 +798,9 @@
Gui\game list
+
+ Gui\debugger
+
diff --git a/rpcs3/rpcs3qt/emu_settings.cpp b/rpcs3/rpcs3qt/emu_settings.cpp
index 539bd1b67b..be59923fa6 100644
--- a/rpcs3/rpcs3qt/emu_settings.cpp
+++ b/rpcs3/rpcs3qt/emu_settings.cpp
@@ -306,7 +306,7 @@ void emu_settings::EnhanceSlider(QSlider* slider, SettingsType type, bool is_ran
connect(slider, &QSlider::valueChanged, [=](int value)
{
- SetSetting(type, sstr(slider->value()));
+ SetSetting(type, sstr(value));
});
}
diff --git a/rpcs3/rpcs3qt/emu_settings.h b/rpcs3/rpcs3qt/emu_settings.h
index 000edd4578..9ed760399c 100644
--- a/rpcs3/rpcs3qt/emu_settings.h
+++ b/rpcs3/rpcs3qt/emu_settings.h
@@ -63,6 +63,7 @@ public:
ResolutionScale,
MinimumScalableDimension,
ForceCPUBlitEmulation,
+ DisableOnDiskShaderCache,
// Audio
AudioRenderer,
@@ -213,6 +214,7 @@ private:
{ DisableVertexCache, { "Video", "Disable Vertex Cache"}},
{ DisableOcclusionQueries, { "Video", "Disable ZCull Occlusion Queries" }},
{ ForceCPUBlitEmulation, { "Video", "Force CPU Blit" }},
+ { DisableOnDiskShaderCache, { "Video", "Disable On-Disk Shader Cache"}},
{ AnisotropicFilterOverride,{ "Video", "Anisotropic Filter Override" }},
{ ResolutionScale, { "Video", "Resolution Scale" }},
{ MinimumScalableDimension, { "Video", "Minimum Scalable Dimension" }},
diff --git a/rpcs3/rpcs3qt/game_list_frame.cpp b/rpcs3/rpcs3qt/game_list_frame.cpp
index c91476fda4..b29b670e41 100644
--- a/rpcs3/rpcs3qt/game_list_frame.cpp
+++ b/rpcs3/rpcs3qt/game_list_frame.cpp
@@ -278,14 +278,15 @@ game_list_frame::game_list_frame(std::shared_ptr guiSettings, std:
{
m_columnActs[col]->setCheckable(true);
- connect(m_columnActs[col], &QAction::triggered, [this, col](bool val)
+ connect(m_columnActs[col], &QAction::triggered, [this, col](bool checked)
{
- if (!val) // be sure to have at least one column left so you can call the context menu at all time
+ if (!checked) // be sure to have at least one column left so you can call the context menu at all time
{
int c = 0;
for (int i = 0; i < m_columnActs.count(); ++i)
{
- if (xgui_settings->GetGamelistColVisibility(i)) { if (++c > 1) { break; } }
+ if (xgui_settings->GetGamelistColVisibility(i) && ++c > 1)
+ break;
}
if (c < 2)
{
@@ -293,8 +294,14 @@ game_list_frame::game_list_frame(std::shared_ptr guiSettings, std:
return;
}
}
- m_gameList->setColumnHidden(col, !val); // Negate because it's a set col hidden and we have menu say show.
- xgui_settings->SetGamelistColVisibility(col, val);
+ m_gameList->setColumnHidden(col, !checked); // Negate because it's a set col hidden and we have menu say show.
+ xgui_settings->SetGamelistColVisibility(col, checked);
+
+ if (checked) // handle hidden columns that have zero width after showing them (stuck between others)
+ {
+ if (m_gameList->columnWidth(col) <= m_gameList->horizontalHeader()->minimumSectionSize())
+ m_gameList->setColumnWidth(col, m_gameList->horizontalHeader()->minimumSectionSize());
+ }
});
}
}
@@ -1128,10 +1135,10 @@ int game_list_frame::PopulateGameList()
return result;
}
-void game_list_frame::PopulateGameGrid(uint maxCols, const QSize& image_size, const QColor& image_color)
+void game_list_frame::PopulateGameGrid(int maxCols, const QSize& image_size, const QColor& image_color)
{
- uint r = 0;
- uint c = 0;
+ int r = 0;
+ int c = 0;
std::string selected_item = CurrentSelectionIconPath();
@@ -1200,7 +1207,7 @@ void game_list_frame::PopulateGameGrid(uint maxCols, const QSize& image_size, co
if (c != 0)
{ // if left over games exist -- if empty entries exist
- for (uint col = c; col < maxCols; ++col)
+ for (int col = c; col < maxCols; ++col)
{
QTableWidgetItem* emptyItem = new QTableWidgetItem();
emptyItem->setFlags(Qt::NoItemFlags);
@@ -1232,18 +1239,13 @@ std::string game_list_frame::CurrentSelectionIconPath()
{
std::string selection = "";
- // The index can be more than the size of m_game_data if you use the VFS to load a directory which has less games.
- if (m_oldLayoutIsList && m_gameList->selectedItems().count() && m_gameList->currentRow() < m_game_data.size())
+ if (m_gameList->selectedItems().count())
{
- selection = m_game_data.at(m_gameList->item(m_gameList->currentRow(), 0)->data(Qt::UserRole).toInt()).info.icon_path;
- }
- else if (!m_oldLayoutIsList && m_xgrid->selectedItems().count())
- {
- int ind = m_xgrid->currentItem()->data(Qt::UserRole).toInt();
+ QTableWidgetItem* item = m_oldLayoutIsList ? m_gameList->item(m_gameList->currentRow(), 0) : m_xgrid->currentItem();
+ int ind = item->data(Qt::UserRole).toInt();
+
if (ind < m_game_data.size())
- {
selection = m_game_data.at(ind).info.icon_path;
- }
}
m_oldLayoutIsList = m_isListLayout;
diff --git a/rpcs3/rpcs3qt/game_list_frame.h b/rpcs3/rpcs3qt/game_list_frame.h
index 97c9fb278e..dcf0a02ac5 100644
--- a/rpcs3/rpcs3qt/game_list_frame.h
+++ b/rpcs3/rpcs3qt/game_list_frame.h
@@ -241,7 +241,7 @@ protected:
private:
QPixmap PaintedPixmap(const QImage& img, bool paintConfigIcon = false);
bool Boot(const GameInfo& info);
- void PopulateGameGrid(uint maxCols, const QSize& image_size, const QColor& image_color);
+ void PopulateGameGrid(int maxCols, const QSize& image_size, const QColor& image_color);
void FilterData();
void SortGameList();
diff --git a/rpcs3/rpcs3qt/gui_settings.cpp b/rpcs3/rpcs3qt/gui_settings.cpp
index ec32dcada8..65ad15510b 100644
--- a/rpcs3/rpcs3qt/gui_settings.cpp
+++ b/rpcs3/rpcs3qt/gui_settings.cpp
@@ -260,6 +260,7 @@ void gui_settings::ShowInfoBox(const gui_save& entry, const QString& title, cons
{
QCheckBox* cb = new QCheckBox(tr("Don't show again"));
QMessageBox* mb = new QMessageBox(QMessageBox::Information, title, text, QMessageBox::Ok, parent);
+ mb->setWindowFlags(mb->windowFlags() & ~Qt::WindowContextHelpButtonHint);
mb->setCheckBox(cb);
mb->deleteLater();
mb->exec();
diff --git a/rpcs3/rpcs3qt/main_window.cpp b/rpcs3/rpcs3qt/main_window.cpp
index f62d67bd60..7d6f854a2f 100644
--- a/rpcs3/rpcs3qt/main_window.cpp
+++ b/rpcs3/rpcs3qt/main_window.cpp
@@ -452,7 +452,7 @@ void main_window::InstallPup(const QString& dropPath)
std::string version_string = pup.get_file(0x100).to_string();
version_string.erase(version_string.find('\n'));
- const std::string cur_version = "4.81";
+ const std::string cur_version = "4.82";
if (version_string < cur_version &&
QMessageBox::question(this, tr("RPCS3 Firmware Installer"), tr("Old firmware detected.\nThe newest firmware version is %1 and you are trying to install version %2\nContinue installation?").arg(qstr(cur_version), qstr(version_string)),
diff --git a/rpcs3/rpcs3qt/pad_settings_dialog.cpp b/rpcs3/rpcs3qt/pad_settings_dialog.cpp
index 1d52907e91..0f2894aa7f 100644
--- a/rpcs3/rpcs3qt/pad_settings_dialog.cpp
+++ b/rpcs3/rpcs3qt/pad_settings_dialog.cpp
@@ -82,12 +82,12 @@ pad_settings_dialog::pad_settings_dialog(const std::string& device, const std::s
if (lx != preview_values[2] || ly != preview_values[3])
{
lx = preview_values[2], ly = preview_values[3];
- RepaintPreviewLabel(ui->preview_stick_left, ui->slider_stick_left->value(), ui->slider_stick_left->sizeHint().width(), lx, ly);
+ RepaintPreviewLabel(ui->preview_stick_left, ui->slider_stick_left->value(), ui->slider_stick_left->size().width(), lx, ly);
}
if (rx != preview_values[4] || ry != preview_values[5])
{
rx = preview_values[4], ry = preview_values[5];
- RepaintPreviewLabel(ui->preview_stick_right, ui->slider_stick_right->value(), ui->slider_stick_right->sizeHint().width(), rx, ry);
+ RepaintPreviewLabel(ui->preview_stick_right, ui->slider_stick_right->value(), ui->slider_stick_right->size().width(), rx, ry);
}
}
@@ -202,16 +202,16 @@ pad_settings_dialog::pad_settings_dialog(const std::string& device, const std::s
initSlider(ui->slider_stick_left, m_handler_cfg.lstickdeadzone, 0, m_handler->thumb_max);
initSlider(ui->slider_stick_right, m_handler_cfg.rstickdeadzone, 0, m_handler->thumb_max);
- RepaintPreviewLabel(ui->preview_stick_left, ui->slider_stick_left->value(), ui->slider_stick_left->sizeHint().width(), lx, ly);
+ RepaintPreviewLabel(ui->preview_stick_left, ui->slider_stick_left->value(), ui->slider_stick_left->size().width(), lx, ly);
connect(ui->slider_stick_left, &QSlider::valueChanged, [&](int value)
{
- RepaintPreviewLabel(ui->preview_stick_left, value, ui->slider_stick_left->sizeHint().width(), lx, ly);
+ RepaintPreviewLabel(ui->preview_stick_left, value, ui->slider_stick_left->size().width(), lx, ly);
});
- RepaintPreviewLabel(ui->preview_stick_right, ui->slider_stick_right->value(), ui->slider_stick_right->sizeHint().width(), rx, ry);
+ RepaintPreviewLabel(ui->preview_stick_right, ui->slider_stick_right->value(), ui->slider_stick_right->size().width(), rx, ry);
connect(ui->slider_stick_right, &QSlider::valueChanged, [&](int value)
{
- RepaintPreviewLabel(ui->preview_stick_right, value, ui->slider_stick_right->sizeHint().width(), rx, ry);
+ RepaintPreviewLabel(ui->preview_stick_right, value, ui->slider_stick_right->size().width(), rx, ry);
});
}
else
diff --git a/rpcs3/rpcs3qt/register_editor_dialog.cpp b/rpcs3/rpcs3qt/register_editor_dialog.cpp
index 1a021379de..e43315b645 100644
--- a/rpcs3/rpcs3qt/register_editor_dialog.cpp
+++ b/rpcs3/rpcs3qt/register_editor_dialog.cpp
@@ -66,7 +66,6 @@ register_editor_dialog::register_editor_dialog(QWidget *parent, u32 _pc, const s
break;
}
-
default:
QMessageBox::critical(this, tr("Error"), tr("Not supported thread."));
return;
@@ -85,14 +84,22 @@ register_editor_dialog::register_editor_dialog(QWidget *parent, u32 _pc, const s
// Events
connect(button_ok, &QAbstractButton::pressed, this, [=](){OnOkay(_cpu); accept();});
connect(button_cancel, &QAbstractButton::pressed, this, ®ister_editor_dialog::reject);
- connect(m_register_combo, static_cast(&QComboBox::currentIndexChanged), this, ®ister_editor_dialog::updateRegister);
+ connect(m_register_combo, &QComboBox::currentTextChanged, this, ®ister_editor_dialog::updateRegister);
+
+ updateRegister(m_register_combo->currentText());
}
-void register_editor_dialog::updateRegister()
+void register_editor_dialog::updateRegister(const QString& text)
{
+ if (text.isEmpty())
+ {
+ m_value_line->setText("");
+ return;
+ }
+
const auto cpu = this->cpu.lock();
- std::string reg = sstr(m_register_combo->itemData(m_register_combo->currentIndex()));
+ std::string reg = sstr(text);
std::string str;
if (g_system == system_type::ps3 && cpu->id_type() == 1)
diff --git a/rpcs3/rpcs3qt/register_editor_dialog.h b/rpcs3/rpcs3qt/register_editor_dialog.h
index af64b231ea..fc8bd2ca6c 100644
--- a/rpcs3/rpcs3qt/register_editor_dialog.h
+++ b/rpcs3/rpcs3qt/register_editor_dialog.h
@@ -17,6 +17,8 @@
class register_editor_dialog : public QDialog
{
+ Q_OBJECT
+
u32 m_pc;
CPUDisAsm* m_disasm;
QComboBox* m_register_combo;
@@ -28,8 +30,9 @@ public:
public:
register_editor_dialog(QWidget *parent, u32 _pc, const std::shared_ptr& _cpu, CPUDisAsm* _disasm);
- void updateRegister();
-
private:
void OnOkay(const std::shared_ptr& _cpu);
+
+private Q_SLOTS:
+ void updateRegister(const QString& text);
};
diff --git a/rpcs3/rpcs3qt/save_data_list_dialog.cpp b/rpcs3/rpcs3qt/save_data_list_dialog.cpp
index 5ac818c84e..7c9e94bdfd 100644
--- a/rpcs3/rpcs3qt/save_data_list_dialog.cpp
+++ b/rpcs3/rpcs3qt/save_data_list_dialog.cpp
@@ -84,7 +84,7 @@ save_data_list_dialog::save_data_list_dialog(const std::vector& e
{
m_entry = cr;
UpdateSelectionLabel();
- Q_UNUSED(cr); Q_UNUSED(pr); Q_UNUSED(pc);
+ Q_UNUSED(cc); Q_UNUSED(pr); Q_UNUSED(pc);
});
connect(m_list->horizontalHeader(), &QHeaderView::sectionClicked, this, &save_data_list_dialog::OnSort);
diff --git a/rpcs3/rpcs3qt/settings_dialog.cpp b/rpcs3/rpcs3qt/settings_dialog.cpp
index 6e43ee81ea..de1b78447c 100644
--- a/rpcs3/rpcs3qt/settings_dialog.cpp
+++ b/rpcs3/rpcs3qt/settings_dialog.cpp
@@ -954,6 +954,9 @@ settings_dialog::settings_dialog(std::shared_ptr guiSettings, std:
xemu_settings->EnhanceCheckBox(ui->forceCpuBlitEmulation, emu_settings::ForceCPUBlitEmulation);
SubscribeTooltip(ui->forceCpuBlitEmulation, json_debug["forceCpuBlitEmulation"].toString());
+ xemu_settings->EnhanceCheckBox(ui->disableOnDiskShaderCache, emu_settings::DisableOnDiskShaderCache);
+ SubscribeTooltip(ui->disableOnDiskShaderCache, json_debug["disableOnDiskShaderCache"].toString());
+
// Checkboxes: core debug options
xemu_settings->EnhanceCheckBox(ui->ppuDebug, emu_settings::PPUDebug);
SubscribeTooltip(ui->ppuDebug, json_debug["ppuDebug"].toString());
diff --git a/rpcs3/rpcs3qt/settings_dialog.ui b/rpcs3/rpcs3qt/settings_dialog.ui
index 09b7460bfb..5455401e0e 100644
--- a/rpcs3/rpcs3qt/settings_dialog.ui
+++ b/rpcs3/rpcs3qt/settings_dialog.ui
@@ -36,7 +36,7 @@
- 0
+ 7
@@ -1666,6 +1666,13 @@
+ -
+
+
+ Disable On-Disk Shader Cache
+
+
+
diff --git a/rpcs3/rpcs3qt/trophy_manager_dialog.cpp b/rpcs3/rpcs3qt/trophy_manager_dialog.cpp
index b227d6e28d..2099d21a40 100644
--- a/rpcs3/rpcs3qt/trophy_manager_dialog.cpp
+++ b/rpcs3/rpcs3qt/trophy_manager_dialog.cpp
@@ -269,7 +269,7 @@ bool trophy_manager_dialog::LoadTrophyFolderToDB(const std::string& trop_name)
return false;
}
- for (int trophy_id = 0; trophy_id < game_trophy_data->trop_usr->GetTrophiesCount(); ++trophy_id)
+ for (u32 trophy_id = 0; trophy_id < game_trophy_data->trop_usr->GetTrophiesCount(); ++trophy_id)
{
// Figure out how many zeros are needed for padding. (either 0, 1, or 2)
QString padding = "";
diff --git a/rpcs3/rpcs3qt/trophy_notification_frame.cpp b/rpcs3/rpcs3qt/trophy_notification_frame.cpp
index de42ba98ea..b3de736ea3 100644
--- a/rpcs3/rpcs3qt/trophy_notification_frame.cpp
+++ b/rpcs3/rpcs3qt/trophy_notification_frame.cpp
@@ -6,7 +6,7 @@
static const int TROPHY_TIMEOUT_MS = 7500;
-inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), _in.size()); }
+constexpr auto qstr = QString::fromStdString;
trophy_notification_frame::trophy_notification_frame(const std::vector& imgBuffer, const SceNpTrophyDetails& trophy, int height) : QWidget()
{
diff --git a/rpcs3/xinput_pad_handler.cpp b/rpcs3/xinput_pad_handler.cpp
index 9eaf37ce72..08267c2cdb 100644
--- a/rpcs3/xinput_pad_handler.cpp
+++ b/rpcs3/xinput_pad_handler.cpp
@@ -475,7 +475,7 @@ bool xinput_pad_handler::bindPadToDevice(std::shared_ptr pad, const std::st
pad->Init
(
- CELL_PAD_STATUS_CONNECTED | CELL_PAD_STATUS_ASSIGN_CHANGES,
+ CELL_PAD_STATUS_DISCONNECTED,
CELL_PAD_SETTING_PRESS_OFF | CELL_PAD_SETTING_SENSOR_OFF,
CELL_PAD_CAPABILITY_PS3_CONFORMITY | CELL_PAD_CAPABILITY_PRESS_MODE | CELL_PAD_CAPABILITY_HP_ANALOG_STICK | CELL_PAD_CAPABILITY_ACTUATOR | CELL_PAD_CAPABILITY_SENSOR_MODE,
CELL_PAD_DEV_TYPE_STANDARD