mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-20 12:29:40 +00:00
Fix Complementary + Euphoria Patches ULTRA on SDL-GPU (#2195)
This commit is contained in:
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());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user