Skip to content

Zero Hour rebuilt from EA's source: x64, Direct3D 11, VS2022/CMake, ~60 original bugs fixed, an AI that builds a base. Bring your own game.

fix(w3ddevice): no render-target feedback from the smudge probe on linux

Richard Louie Orilladd20c0ae2301
diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DSmudge.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DSmudge.cpp
index b97b59cc2..e30581d00 100644
--- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DSmudge.cpp
+++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DSmudge.cpp
@@ -239,6 +239,16 @@ Bool W3DSmudgeManager::testHardwareSupport(void)
if (m_hardwareSupportStatus == SMUDGE_SUPPORT_UNKNOWN)
{ //we have not done the test yet.
+#if defined(__linux__)
+ // The probe's second quad, like every smudge after it, samples the render texture it draws
+ // into. SDL3 GPU cannot read a pass's own target, so the device refuses that draw; the
+ // untouched block then matched the first quad and the probe answered yes, and each smudge
+ // was refused in its turn. Answer no without the feedback draw: smudge systems draw
+ // nothing either way.
+ m_hardwareSupportStatus = SMUDGE_SUPPORT_NO;
+ return FALSE;
+#endif
+
IDirect3DTexture9 *backTexture=W3DShaderManager::getRenderTexture();
if (!backTexture)
{ //do trivial test first to see if render target exists.