summaryrefslogtreecommitdiffstats
path: root/src/glsl
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2011-10-31 13:07:06 -0700
committerIan Romanick <[email protected]>2011-11-03 13:36:00 -0700
commit46173f907979af0b753befdcf6992e19d8453951 (patch)
treec21a314be3461ea596c67796244bf69d3401906a /src/glsl
parent9954a93ab77e64b01b95837f90a567df9e8c94df (diff)
linker: Fix the indentation of a block in cross_validate_globals
I suspect the indentation got messed up during a code merge. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
Diffstat (limited to 'src/glsl')
-rw-r--r--src/glsl/linker.cpp57
1 files changed, 32 insertions, 25 deletions
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp
index beadec6f66c..a595c9c5f7a 100644
--- a/src/glsl/linker.cpp
+++ b/src/glsl/linker.cpp
@@ -415,31 +415,38 @@ cross_validate_globals(struct gl_shader_program *prog,
existing->explicit_location = true;
}
- /* Validate layout qualifiers for gl_FragDepth.
- *
- * From the AMD/ARB_conservative_depth specs:
- * "If gl_FragDepth is redeclared in any fragment shader in
- * a program, it must be redeclared in all fragment shaders in that
- * program that have static assignments to gl_FragDepth. All
- * redeclarations of gl_FragDepth in all fragment shaders in
- * a single program must have the same set of qualifiers."
- */
- if (strcmp(var->name, "gl_FragDepth") == 0) {
- bool layout_declared = var->depth_layout != ir_depth_layout_none;
- bool layout_differs = var->depth_layout != existing->depth_layout;
- if (layout_declared && layout_differs) {
- linker_error(prog,
- "All redeclarations of gl_FragDepth in all fragment shaders "
- "in a single program must have the same set of qualifiers.");
- }
- if (var->used && layout_differs) {
- linker_error(prog,
- "If gl_FragDepth is redeclared with a layout qualifier in"
- "any fragment shader, it must be redeclared with the same"
- "layout qualifier in all fragment shaders that have"
- "assignments to gl_FragDepth");
- }
- }
+ /* Validate layout qualifiers for gl_FragDepth.
+ *
+ * From the AMD/ARB_conservative_depth specs:
+ *
+ * "If gl_FragDepth is redeclared in any fragment shader in a
+ * program, it must be redeclared in all fragment shaders in
+ * that program that have static assignments to
+ * gl_FragDepth. All redeclarations of gl_FragDepth in all
+ * fragment shaders in a single program must have the same set
+ * of qualifiers."
+ */
+ if (strcmp(var->name, "gl_FragDepth") == 0) {
+ bool layout_declared = var->depth_layout != ir_depth_layout_none;
+ bool layout_differs =
+ var->depth_layout != existing->depth_layout;
+
+ if (layout_declared && layout_differs) {
+ linker_error(prog,
+ "All redeclarations of gl_FragDepth in all "
+ "fragment shaders in a single program must have "
+ "the same set of qualifiers.");
+ }
+
+ if (var->used && layout_differs) {
+ linker_error(prog,
+ "If gl_FragDepth is redeclared with a layout "
+ "qualifier in any fragment shader, it must be "
+ "redeclared with the same layout qualifier in "
+ "all fragment shaders that have assignments to "
+ "gl_FragDepth");
+ }
+ }
/* FINISHME: Handle non-constant initializers.
*/