Fix Complementary + Euphoria Patches ULTRA on SDL-GPU (#2195)

This commit is contained in:
Jason Mitchell authored and GitHub committed 2026-10-02 22:40:06 -07:00
1 parent 37afddab5d
commit bdcb4d1882
6 files changed
+141 -4

No files matched your search

@@ -559,14 +559,13 @@ public class ShaderTransformer {
artifactsOut.put(shaderType, new StageArtifact(treeHolder[0], formattedShader.length() - printedBody.length()));
}
}
maybeExtractRwImageStores(result, patchType);
if (BackendManager.RENDER_BACKEND.isSDLGPU()) extractRwImageStores(result, patchType, artifactsOut);
watch.stop();
Iris.logger.info("[Load #{}] Transformed shader for {} in {}", Iris.getShaderPackLoadId(), patchType.name(), watch);
return result;
}
private static void maybeExtractRwImageStores(EnumMap<PatchShaderType, String> result, Patch patchType) {
if (!BackendManager.RENDER_BACKEND.isSDLGPU()) return;
static void extractRwImageStores(EnumMap<PatchShaderType, String> result, Patch patchType, EnumMap<PatchShaderType, StageArtifact> artifactsOut) {
if (result.containsKey(PatchShaderType.COMPUTE)) return;
final String vsh = result.get(PatchShaderType.VERTEX);
@@ -580,10 +579,12 @@ public class ShaderTransformer {
if (vshResult != null) {
result.put(PatchShaderType.VERTEX, vshResult.strippedSource());
result.put(PatchShaderType.COMPUTE, vshResult.computeSource());
if (artifactsOut != null) artifactsOut.remove(PatchShaderType.VERTEX);
Iris.logger.info("[RwImageStoreExtractor] Extracted compute pre-pass for {} (mode={}, written={})", patchType.name(), vshResult.mode(), vshResult.writtenImages());
} else if (fshResult != null) {
result.put(PatchShaderType.FRAGMENT, fshResult.strippedSource());
result.put(PatchShaderType.COMPUTE, fshResult.computeSource());
if (artifactsOut != null) artifactsOut.remove(PatchShaderType.FRAGMENT);
Iris.logger.info("[RwImageStoreExtractor] Extracted compute pre-pass for {} (mode={}, written={})", patchType.name(), fshResult.mode(), fshResult.writtenImages());
}
}