Merge pull request #1523 from sparmarNV/fix-SPV_NV_mesh_shader
Allow redeclaration of builtin interface blocks in mesh shader
This commit is contained in:
commit
c374030e80
13 changed files with 875 additions and 305 deletions
|
|
@ -715,6 +715,17 @@ void TIntermediate::finalCheck(TInfoSink& infoSink, bool keepUncalled)
|
|||
error(infoSink, "Only one shaderRecordNVX buffer block is allowed per stage");
|
||||
break;
|
||||
case EShLangMeshNV:
|
||||
// NV_mesh_shader doesn't allow use of both single-view and per-view builtins.
|
||||
if (inIoAccessed("gl_Position") && inIoAccessed("gl_PositionPerViewNV"))
|
||||
error(infoSink, "Can only use one of gl_Position or gl_PositionPerViewNV");
|
||||
if (inIoAccessed("gl_ClipDistance") && inIoAccessed("gl_ClipDistancePerViewNV"))
|
||||
error(infoSink, "Can only use one of gl_ClipDistance or gl_ClipDistancePerViewNV");
|
||||
if (inIoAccessed("gl_CullDistance") && inIoAccessed("gl_CullDistancePerViewNV"))
|
||||
error(infoSink, "Can only use one of gl_CullDistance or gl_CullDistancePerViewNV");
|
||||
if (inIoAccessed("gl_Layer") && inIoAccessed("gl_LayerPerViewNV"))
|
||||
error(infoSink, "Can only use one of gl_Layer or gl_LayerPerViewNV");
|
||||
if (inIoAccessed("gl_ViewportMask") && inIoAccessed("gl_ViewportMaskPerViewNV"))
|
||||
error(infoSink, "Can only use one of gl_ViewportMask or gl_ViewportMaskPerViewNV");
|
||||
if (outputPrimitive == ElgNone)
|
||||
error(infoSink, "At least one shader must specify an output layout primitive");
|
||||
if (vertices == TQualifier::layoutNotSet)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue