Compare commits

...
3 Commits
Author SHA1 Message Date
lightningterror 2ce2cb6459 GS/DX11: Fix uav null_texture usage.
We shouldn't use Feedback alone here as it would cause issues and trigger ValidateUsageAndFormat assert, use FeedbackTarget as that's the next best without uav.
2026-08-01 19:53:35 +02:00
TheLastRarandlightningterror 779d5c4339 GS/VK: Workaround Nvidia issue when swapping ROV targets 2026-07-31 23:20:42 +02:00
lightningterror fe55f87289 GS/VK: Remove undefined unused shader macro. 2026-07-31 17:29:28 +02:00
4 changed files with 14 additions and 3 deletions
+1 -1
View File
@@ -587,7 +587,7 @@ void main()
#define PS_FEEDBACK_LOOP_IS_NEEDED_RT (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_DEPTH (AFAIL_NEEDS_DEPTH || ZTST_NEEDS_DEPTH || AA1_NEEDS_DEPTH)
#define ZWRITE (PS_ZCLAMP || PS_ZFLOOR || SW_DEPTH || PS_FEEDBACK_LOOP_IS_NEEDED_DEPTH)
#define ZWRITE (PS_ZCLAMP || PS_ZFLOOR || PS_FEEDBACK_LOOP_IS_NEEDED_DEPTH)
#define PS_RETURN_COLOR_ROV (!PS_NO_COLOR && PS_ROV_COLOR)
#define PS_RETURN_COLOR (!PS_NO_COLOR && !PS_ROV_COLOR)
+1 -1
View File
@@ -603,7 +603,7 @@ bool GSDevice11::Create(GSVSyncMode vsync_mode, bool allow_present_throttle)
}
// 1x1 dummy texture.
const GSTexture::Usage null_usage = m_uav_texture ? GSTexture::ShaderWriteTarget : GSTexture::Feedback;
const GSTexture::Usage null_usage = m_uav_texture ? GSTexture::ShaderWriteTarget : GSTexture::FeedbackTarget;
m_null_texture = CreateSurface(null_usage, 1, 1, 1, GSTexture::Format::Color);
if (!m_null_texture)
return false;
+11
View File
@@ -5418,6 +5418,17 @@ void GSDeviceVK::PSSetROVs(GSTexture* rt, GSTexture* ds, bool write_rt, bool wri
PSSetShaderResource(TFX_TEXTURE_DEPTH_ROV, nullptr, false);
}
if (IsDeviceNVIDIA() && InRenderPass())
{
// Nvidia doesn't like switching ROV targets mid-render pass, doing so causes flickering or missing geometry.
// End the render pass to avoid such issues.
if (vkRt != oldVkRt || vkDs != oldVkDs)
{
GL_INS("VK: Ending render pass due to UAV switch");
EndRenderPass();
}
}
if (GSConfig.HWROVBarriersVK)
{
// This is to fix issues with some systems that seem to require barriers even with FSI.
+1 -1
View File
@@ -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 = 108; // Last changed in PR 14688
static constexpr u32 SHADER_CACHE_VERSION = 109; // Last changed in PR 14795