Skip to content

Commit 00d26a3

Browse files
committed
Merge remote-tracking branch 'origin/1.20.3' into 1.20.3
2 parents 418cf94 + 7a3c1ca commit 00d26a3

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

src/main/java/net/irisshaders/iris/pipeline/transform/TransformPatcher.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,8 @@ private static Map<PatchShaderType, String> transformInternal(
211211
Map<PatchShaderType, String> inputs,
212212
Parameters parameters) {
213213
try {
214+
// set shader name
215+
parameters.name = name;
214216
return transformer.transform(inputs, parameters);
215217
} catch (TransformationException | ParsingException | IllegalStateException | IllegalArgumentException e) {
216218
// print the offending programs and rethrow to stop the loading process

src/main/java/net/irisshaders/iris/pipeline/transform/parameter/Parameters.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ public abstract class Parameters implements JobParameters {
1515
public PatchShaderType type; // may only be set by TransformPatcher
1616
// WARNING: adding new fields requires updating hashCode and equals methods!
1717

18+
// name of the shader, this should not be part of hash/equals
19+
public String name; // set by TransformPatcher
20+
1821
public Parameters(Patch patch, Object2ObjectMap<Tri<String, TextureType, TextureStage>, String> textureMap) {
1922
this.patch = patch;
2023
this.textureMap = textureMap;

src/main/java/net/irisshaders/iris/pipeline/transform/transformer/CompatibilityTransformer.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ public static void transformGrouped(
472472

473473
if (inTypeSpecifier == null) {
474474
LOGGER.warn(
475-
"The in declaration '" + name + "' in the " + currentType.glShaderType.name()
475+
"The in declaration '" + name + "' in the " + parameters.name + " " + currentType.glShaderType.name()
476476
+ " shader that has a missing corresponding out declaration in the previous stage "
477477
+ prevType.name()
478478
+ " has a non-numeric type and could not be compatibility-patched. See debugging.md for more information.");
@@ -497,7 +497,7 @@ public static void transformGrouped(
497497
outDeclarations.put(name, null);
498498

499499
LOGGER.warn(
500-
"The in declaration '" + name + "' in the " + currentType.glShaderType.name()
500+
"The in declaration '" + name + "' in the " + parameters.name + " " + currentType.glShaderType.name()
501501
+ " shader is missing a corresponding out declaration in the previous stage "
502502
+ prevType.name()
503503
+ " and has been compatibility-patched. See debugging.md for more information.");
@@ -523,7 +523,7 @@ public static void transformGrouped(
523523
// declaration is not
524524
if (outTypeSpecifier.getArraySpecifier() != null) {
525525
LOGGER.warn(
526-
"The out declaration '" + name + "' in the " + prevPatchTypes.glShaderType.name()
526+
"The out declaration '" + name + "' in the " + parameters.name + " " + prevPatchTypes.glShaderType.name()
527527
+ " shader that has a missing corresponding in declaration in the next stage "
528528
+ type.name()
529529
+ " has an array type and could not be compatibility-patched. See debugging.md for more information.");
@@ -543,7 +543,7 @@ public static void transformGrouped(
543543
outDeclarations.put(name, null);
544544

545545
LOGGER.warn(
546-
"The in declaration '" + name + "' in the " + currentType.glShaderType.name()
546+
"The in declaration '" + name + "' in the " + parameters.name + " " + currentType.glShaderType.name()
547547
+ " shader that is never assigned to in the previous stage "
548548
+ prevType.name()
549549
+ " has been compatibility-patched by adding an initialization for it. See debugging.md for more information.");
@@ -553,7 +553,7 @@ public static void transformGrouped(
553553
// bail and warn on mismatching dimensionality
554554
if (outType.getDimension() != inType.getDimension()) {
555555
LOGGER.warn(
556-
"The in declaration '" + name + "' in the " + currentType.glShaderType.name()
556+
"The in declaration '" + name + "' in the " + parameters.name + " " + currentType.glShaderType.name()
557557
+ " shader has a mismatching dimensionality (scalar/vector/matrix) with the out declaration in the previous stage "
558558
+ prevType.name()
559559
+ " and could not be compatibility-patched. See debugging.md for more information.");
@@ -619,7 +619,7 @@ public static void transformGrouped(
619619
outDeclarations.put(name, null);
620620

621621
LOGGER.warn(
622-
"The out declaration '" + name + "' in the " + prevType.name()
622+
"The out declaration '" + name + "' in the " + parameters.name + " " + prevType.name()
623623
+ " shader has a different type " + outType.getMostCompactName()
624624
+ " than the corresponding in declaration of type " + inType.getMostCompactName()
625625
+ " in the following stage " + currentType.glShaderType.name()

0 commit comments

Comments
 (0)