Compare commits

...

5 Commits

Author SHA1 Message Date
lightningterror
426261ebbe Qt/FSUI: Not needed to mark dx12 as Not Recommended anymore. 2025-12-07 18:00:13 +01:00
lightningterror
aedaf5a9a7 GS/DX12: Disable broken point sampler, only dx11 requires it. 2025-12-07 18:00:13 +01:00
lightningterror
d83417ba0d GS/HW: Properly disable dual source output between multipass blending.
Fixes api warning on dx11: The Pixel Shader expects a Render Target View bound to slot 1, but none is bound.

Might also fix some potential crashes on intel gpus on all apis (mostly dx11/12).
2025-12-07 18:00:13 +01:00
lightningterror
23cd5a9da7 GS/HW: Remove the extra conditions when texture barrier/multidraw fb copy is not supported.
No longer needed, these conditions were originally used to use less copies on dx11/12 on basic blend.

Currently all renderers by default will hit the code so the old checks are kinda redundant, also copies are faster than they used to be.
2025-12-07 18:00:13 +01:00
PCSX2 Bot
1fd017f410 [ci skip] Qt: Update Base Translation. 2025-12-07 13:14:24 +01:00
9 changed files with 1944 additions and 1878 deletions

View File

@@ -25,7 +25,7 @@ static constexpr RendererInfo s_renderer_info[] = {
//: Graphics backend/engine type. Leave as-is.
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "Direct3D 11"), GSRendererType::DX11},
//: Graphics backend/engine type. Leave as-is.
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "Direct3D 12 (Not Recommended)"), GSRendererType::DX12},
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "Direct3D 12"), GSRendererType::DX12},
#endif
#ifdef ENABLE_OPENGL
//: Graphics backend/engine type. Leave as-is.

File diff suppressed because it is too large Load Diff

View File

@@ -762,9 +762,10 @@ struct alignas(16) GSHWDrawConfig
struct BlendMultiPass
{
BlendState blend;
u8 blend_hw; /*HWBlendType*/
u8 dither;
bool enable;
bool enable : 1;
u8 no_color1 : 1;
u8 blend_hw : 3; // HWBlendType
u8 dither : 2;
};
static_assert(sizeof(BlendMultiPass) == 8, "blend multi pass is 8 bytes");

View File

@@ -1908,7 +1908,7 @@ void GSDevice11::SetupOM(OMDepthStencilSelector dssel, OMBlendSelector bsel, u8
} };
// clang-format on
bd.RenderTarget[0].BlendEnable = TRUE;
bd.RenderTarget[0].BlendEnable = bsel.blend.enable;
bd.RenderTarget[0].BlendOp = s_d3d11_blend_ops[bsel.blend.op];
bd.RenderTarget[0].SrcBlend = s_d3d11_blend_factors[bsel.blend.src_factor];
bd.RenderTarget[0].DestBlend = s_d3d11_blend_factors[bsel.blend.dst_factor];
@@ -2765,6 +2765,7 @@ void GSDevice11::RenderHW(GSHWDrawConfig& config)
if (config.blend_multi_pass.enable)
{
config.ps.no_color1 = config.blend_multi_pass.no_color1;
config.ps.blend_hw = config.blend_multi_pass.blend_hw;
config.ps.dither = config.blend_multi_pass.dither;
SetupPS(config.ps, &config.cb_ps, config.sampler);

View File

@@ -1222,11 +1222,11 @@ void GSDevice12::InsertDebugMessage(DebugMessageCategory category, const char* f
bool GSDevice12::CheckFeatures(const u32& vendor_id)
{
const bool isAMD = (vendor_id == 0x1002 || vendor_id == 0x1022);
//const bool isAMD = (vendor_id == 0x1002 || vendor_id == 0x1022);
m_features.texture_barrier = false;
m_features.multidraw_fb_copy = GSConfig.OverrideTextureBarriers != 0;
m_features.broken_point_sampler = isAMD;
m_features.broken_point_sampler = false;
m_features.primitive_id = true;
m_features.prefer_new_textures = true;
m_features.provoking_vertex_last = false;
@@ -4045,6 +4045,7 @@ void GSDevice12::RenderHW(GSHWDrawConfig& config)
SetBlendConstants(config.blend_multi_pass.blend.constant);
pipe.bs = config.blend_multi_pass.blend;
pipe.ps.no_color1 = config.blend_multi_pass.no_color1;
pipe.ps.blend_hw = config.blend_multi_pass.blend_hw;
pipe.ps.dither = config.blend_multi_pass.dither;
if (BindDrawPipeline(pipe))

View File

@@ -5762,8 +5762,7 @@ void GSRendererHW::EmulateBlending(int rt_alpha_min, int rt_alpha_max, const boo
const bool blend_ad = m_conf.ps.blend_c == 1;
bool blend_ad_alpha_masked = blend_ad && !m_conf.colormask.wa;
const bool is_basic_blend = GSConfig.AccurateBlendingUnit != AccBlendLevel::Minimum;
if (blend_ad_alpha_masked && (((is_basic_blend || (COLCLAMP.CLAMP == 0)) && (features.texture_barrier || features.multidraw_fb_copy))
|| ((GSConfig.AccurateBlendingUnit >= AccBlendLevel::Medium) || m_conf.require_one_barrier)))
if (blend_ad_alpha_masked && ((is_basic_blend || (COLCLAMP.CLAMP == 0) || m_conf.require_one_barrier)))
{
// Swap Ad with As for hw blend.
m_conf.ps.a_masked = 1;
@@ -6335,6 +6334,11 @@ void GSRendererHW::EmulateBlending(int rt_alpha_min, int rt_alpha_max, const boo
m_conf.blend_multi_pass.enable = true;
m_conf.blend_multi_pass.blend = {true, GSDevice::DST_ALPHA, GSDevice::CONST_ONE, GSDevice::OP_REV_SUBTRACT, GSDevice::CONST_ONE, GSDevice::CONST_ZERO, false, 0};
}
// Remove second color output when unused. Works around bugs in some drivers (e.g. Intel).
m_conf.blend_multi_pass.no_color1 = !m_conf.blend_multi_pass.enable ||
(!GSDevice::IsDualSourceBlendFactor(m_conf.blend_multi_pass.blend.src_factor) &&
!GSDevice::IsDualSourceBlendFactor(m_conf.blend_multi_pass.blend.dst_factor));
}
if (!m_conf.blend_multi_pass.enable && blend_flag & BLEND_HW1)
@@ -6365,9 +6369,7 @@ void GSRendererHW::EmulateBlending(int rt_alpha_min, int rt_alpha_max, const boo
// Remove second color output when unused. Works around bugs in some drivers (e.g. Intel).
m_conf.ps.no_color1 = !GSDevice::IsDualSourceBlendFactor(m_conf.blend.src_factor) &&
!GSDevice::IsDualSourceBlendFactor(m_conf.blend.dst_factor) &&
!GSDevice::IsDualSourceBlendFactor(m_conf.blend_multi_pass.blend.src_factor) &&
!GSDevice::IsDualSourceBlendFactor(m_conf.blend_multi_pass.blend.dst_factor);
!GSDevice::IsDualSourceBlendFactor(m_conf.blend.dst_factor);
}
// Notify the shader that it needs to invert rounding
@@ -7771,6 +7773,7 @@ __ri void GSRendererHW::DrawPrims(GSTextureCache::Target* rt, GSTextureCache::Ta
{
if (m_conf.blend_multi_pass.enable)
{
m_conf.blend_multi_pass.no_color1 = false;
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;
}

View File

@@ -2694,10 +2694,11 @@ void GSDeviceOGL::RenderHW(GSHWDrawConfig& config)
{
OMSetBlendState();
}
psel.ps.no_color1 = config.blend_multi_pass.no_color1;
psel.ps.blend_hw = config.blend_multi_pass.blend_hw;
psel.ps.dither = config.blend_multi_pass.dither;
SetupPipeline(psel);
SendHWDraw(config, config.require_one_barrier, config.require_full_barrier);
DrawIndexedPrimitive();
}
if (config.alpha_second_pass.enable)

View File

@@ -5877,6 +5877,7 @@ void GSDeviceVK::RenderHW(GSHWDrawConfig& config)
SetBlendConstants(config.blend_multi_pass.blend.constant);
pipe.bs = config.blend_multi_pass.blend;
pipe.ps.no_color1 = config.blend_multi_pass.no_color1;
pipe.ps.blend_hw = config.blend_multi_pass.blend_hw;
pipe.ps.dither = config.blend_multi_pass.dither;
if (BindDrawPipeline(pipe))

View File

@@ -4556,7 +4556,7 @@ void FullscreenUI::DrawGraphicsSettingsPage(SettingsInterface* bsi, bool show_ad
FSUI_NSTR("Automatic (Default)"),
#ifdef _WIN32
FSUI_NSTR("Direct3D 11"),
FSUI_NSTR("Direct3D 12 (Not Recommended)"),
FSUI_NSTR("Direct3D 12"),
#endif
#ifdef ENABLE_OPENGL
FSUI_NSTR("OpenGL"),
@@ -9259,25 +9259,27 @@ TRANSLATE_NOOP("FullscreenUI", "Automatically switches to fullscreen mode when a
TRANSLATE_NOOP("FullscreenUI", "Switches between full screen and windowed when the window is double-clicked.");
TRANSLATE_NOOP("FullscreenUI", "Hides the mouse pointer/cursor when the emulator is in fullscreen mode.");
TRANSLATE_NOOP("FullscreenUI", "On-Screen Display");
TRANSLATE_NOOP("FullscreenUI", "Determines how large the on-screen messages and monitor are.");
TRANSLATE_NOOP("FullscreenUI", "Determines how large the on-screen messages and monitors are.");
TRANSLATE_NOOP("FullscreenUI", "%d%%");
TRANSLATE_NOOP("FullscreenUI", "Determines where on-screen display messages are positioned.");
TRANSLATE_NOOP("FullscreenUI", "Determines where performance statistics are positioned.");
TRANSLATE_NOOP("FullscreenUI", "Shows the current PCSX2 version on the top-right corner of the display.");
TRANSLATE_NOOP("FullscreenUI", "Shows the current emulation speed of the system in the top-right corner of the display as a percentage.");
TRANSLATE_NOOP("FullscreenUI", "Shows the number of video frames (or v-syncs) displayed per second by the system in the top-right corner of the display.");
TRANSLATE_NOOP("FullscreenUI", "Shows the CPU usage based on threads in the top-right corner of the display.");
TRANSLATE_NOOP("FullscreenUI", "Shows the host's GPU usage in the top-right corner of the display.");
TRANSLATE_NOOP("FullscreenUI", "Shows the resolution of the game in the top-right corner of the display.");
TRANSLATE_NOOP("FullscreenUI", "Shows statistics about GS (primitives, draw calls) in the top-right corner of the display.");
TRANSLATE_NOOP("FullscreenUI", "Shows the current PCSX2 version.");
TRANSLATE_NOOP("FullscreenUI", "Shows the current emulation speed of the system as a percentage.");
TRANSLATE_NOOP("FullscreenUI", "Shows the number of internal video frames displayed per second by the system.");
TRANSLATE_NOOP("FullscreenUI", "Shows the number of V-syncs performed per second by the system.");
TRANSLATE_NOOP("FullscreenUI", "Shows the internal resolution of the game.");
TRANSLATE_NOOP("FullscreenUI", "Shows the current system CPU and GPU information.");
TRANSLATE_NOOP("FullscreenUI", "Shows statistics about the emulated GS such as primitives and draw calls.");
TRANSLATE_NOOP("FullscreenUI", "Shows the host's CPU utilization based on threads.");
TRANSLATE_NOOP("FullscreenUI", "Shows the host's GPU utilization.");
TRANSLATE_NOOP("FullscreenUI", "Shows indicators when fast forwarding, pausing, and other abnormal states are active.");
TRANSLATE_NOOP("FullscreenUI", "Shows the currently active input recording status.");
TRANSLATE_NOOP("FullscreenUI", "Shows the currently active video capture status.");
TRANSLATE_NOOP("FullscreenUI", "Shows a visual history of frame times.");
TRANSLATE_NOOP("FullscreenUI", "Shows the current configuration in the bottom-right corner of the display.");
TRANSLATE_NOOP("FullscreenUI", "Shows the amount of currently active patches/cheats on the bottom-right corner of the display.");
TRANSLATE_NOOP("FullscreenUI", "Shows the current controller state of the system in the bottom-left corner of the display.");
TRANSLATE_NOOP("FullscreenUI", "Shows a visual history of frame times in the upper-left corner of the display.");
TRANSLATE_NOOP("FullscreenUI", "Shows the current system hardware information on the OSD.");
TRANSLATE_NOOP("FullscreenUI", "Shows the status of the currently active video capture.");
TRANSLATE_NOOP("FullscreenUI", "Shows the status of the currently active input recording.");
TRANSLATE_NOOP("FullscreenUI", "Shows the number of dumped and loaded texture replacements on the OSD.");
TRANSLATE_NOOP("FullscreenUI", "Displays warnings when settings are enabled which may break games.");
TRANSLATE_NOOP("FullscreenUI", "Operations");
TRANSLATE_NOOP("FullscreenUI", "Resets configuration to defaults (excluding controller settings).");
@@ -9761,7 +9763,7 @@ TRANSLATE_NOOP("FullscreenUI", "Full");
TRANSLATE_NOOP("FullscreenUI", "Extra");
TRANSLATE_NOOP("FullscreenUI", "Automatic (Default)");
TRANSLATE_NOOP("FullscreenUI", "Direct3D 11");
TRANSLATE_NOOP("FullscreenUI", "Direct3D 12 (Not Recommended)");
TRANSLATE_NOOP("FullscreenUI", "Direct3D 12");
TRANSLATE_NOOP("FullscreenUI", "OpenGL");
TRANSLATE_NOOP("FullscreenUI", "Vulkan");
TRANSLATE_NOOP("FullscreenUI", "Metal");
@@ -9954,18 +9956,20 @@ TRANSLATE_NOOP("FullscreenUI", "OSD Performance Position");
TRANSLATE_NOOP("FullscreenUI", "Show PCSX2 Version");
TRANSLATE_NOOP("FullscreenUI", "Show Speed");
TRANSLATE_NOOP("FullscreenUI", "Show FPS");
TRANSLATE_NOOP("FullscreenUI", "Show VPS");
TRANSLATE_NOOP("FullscreenUI", "Show Resolution");
TRANSLATE_NOOP("FullscreenUI", "Show Hardware Info");
TRANSLATE_NOOP("FullscreenUI", "Show GS Statistics");
TRANSLATE_NOOP("FullscreenUI", "Show CPU Usage");
TRANSLATE_NOOP("FullscreenUI", "Show GPU Usage");
TRANSLATE_NOOP("FullscreenUI", "Show Resolution");
TRANSLATE_NOOP("FullscreenUI", "Show GS Statistics");
TRANSLATE_NOOP("FullscreenUI", "Show Status Indicators");
TRANSLATE_NOOP("FullscreenUI", "Show Input Recording Status");
TRANSLATE_NOOP("FullscreenUI", "Show Video Capture Status");
TRANSLATE_NOOP("FullscreenUI", "Show Frame Times");
TRANSLATE_NOOP("FullscreenUI", "Show Settings");
TRANSLATE_NOOP("FullscreenUI", "Show Patches");
TRANSLATE_NOOP("FullscreenUI", "Show Inputs");
TRANSLATE_NOOP("FullscreenUI", "Show Frame Times");
TRANSLATE_NOOP("FullscreenUI", "Show Hardware Info");
TRANSLATE_NOOP("FullscreenUI", "Show Video Capture Status");
TRANSLATE_NOOP("FullscreenUI", "Show Input Recording Status");
TRANSLATE_NOOP("FullscreenUI", "Show Texture Replacement Status");
TRANSLATE_NOOP("FullscreenUI", "Warn About Unsafe Settings");
TRANSLATE_NOOP("FullscreenUI", "Reset Settings");
TRANSLATE_NOOP("FullscreenUI", "Change Search Directory");