Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/1.20.3' into 1.20.3
Browse files Browse the repository at this point in the history
  • Loading branch information
IMS212 committed Jun 11, 2024
2 parents 418cf94 + 7a3c1ca commit 00d26a3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ private static Map<PatchShaderType, String> transformInternal(
Map<PatchShaderType, String> inputs,
Parameters parameters) {
try {
// set shader name
parameters.name = name;
return transformer.transform(inputs, parameters);
} catch (TransformationException | ParsingException | IllegalStateException | IllegalArgumentException e) {
// print the offending programs and rethrow to stop the loading process
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ public abstract class Parameters implements JobParameters {
public PatchShaderType type; // may only be set by TransformPatcher
// WARNING: adding new fields requires updating hashCode and equals methods!

// name of the shader, this should not be part of hash/equals
public String name; // set by TransformPatcher

public Parameters(Patch patch, Object2ObjectMap<Tri<String, TextureType, TextureStage>, String> textureMap) {
this.patch = patch;
this.textureMap = textureMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ public static void transformGrouped(

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

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

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

LOGGER.warn(
"The out declaration '" + name + "' in the " + prevType.name()
"The out declaration '" + name + "' in the " + parameters.name + " " + prevType.name()
+ " shader has a different type " + outType.getMostCompactName()
+ " than the corresponding in declaration of type " + inType.getMostCompactName()
+ " in the following stage " + currentType.glShaderType.name()
Expand Down

0 comments on commit 00d26a3

Please sign in to comment.