Skip to content

Commit edc7cde

Browse files
davidgyupixar-oss
authored andcommitted
[Hdx] fixed GLSL const qualifier errors
A const qualifier is not allowed on function return values in GLSL. The NVIDIA shader compiler apparently allows this but it is a compile time error on AMD and other compilers. (Internal change: 2116327)
1 parent 5c02785 commit edc7cde

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pxr/imaging/hdx/shaders/selection.glslfx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
/// selection state.
3636

3737
// This should match the HdSelection enum.
38-
const int GetMaxNumSelectionHighlightModes()
38+
int GetMaxNumSelectionHighlightModes()
3939
{
4040
return 2;
4141
}
@@ -365,7 +365,7 @@ bool IsSelected()
365365
--- --------------------------------------------------------------------------
366366
-- glsl Selection.Geometry.WireSelOffset
367367

368-
const int GetMaxNumSelectionHighlightModes();
368+
int GetMaxNumSelectionHighlightModes();
369369
bool IsElementSelected(int mode);
370370
int GetElementID(); // code gen
371371

@@ -506,4 +506,4 @@ vec4 ApplySelectionColor(vec4 color)
506506

507507
#endif
508508
return color;
509-
}
509+
}

0 commit comments

Comments
 (0)