File tree Expand file tree Collapse file tree 4 files changed +39
-1
lines changed Expand file tree Collapse file tree 4 files changed +39
-1
lines changed Original file line number Diff line number Diff line change @@ -147,9 +147,19 @@ void CollectGeometryShaderProperties::HandleSystemInput(llvm::GenIntrinsicInst&
147
147
case CLIP_DISTANCE_Y:
148
148
case CLIP_DISTANCE_Z:
149
149
case CLIP_DISTANCE_W:
150
+ m_gsProps.Input ().PerVertex ().HasVertexHeader (true );
150
151
m_gsProps.Input ().PerVertex ().HasClipCullDistances (true );
151
152
break ;
152
153
154
+ case POSITION_X:
155
+ case POSITION_Y:
156
+ case POSITION_Z:
157
+ case POSITION_W:
158
+ m_gsProps.Input ().PerVertex ().HasVertexHeader (true );
159
+
160
+ case POINT_WIDTH:
161
+ m_gsProps.Input ().PerVertex ().HasVertexHeader (true );
162
+
153
163
case GS_INSTANCEID:
154
164
m_gsProps.Input ().HasInstanceID (true );
155
165
break ;
Original file line number Diff line number Diff line change @@ -385,9 +385,22 @@ namespace IGC
385
385
if (usage == SHADER_OUTPUT_TYPE_CLIPDISTANCE_LO ||
386
386
usage == SHADER_OUTPUT_TYPE_CLIPDISTANCE_HI)
387
387
{
388
+ context->getModuleMetaData ()->URBInfo .hasVertexHeader = true ;
389
+ context->getModuleMetaData ()->URBInfo .has64BVertexHeaderOutput = true ;
388
390
m_headerSize = QuadEltUnit (4 );
389
391
m_dsPropsPass->DeclareClipDistance ();
390
392
}
393
+ else if (usage == SHADER_OUTPUT_TYPE_POSITION ||
394
+ usage == SHADER_OUTPUT_TYPE_POINTWIDTH ||
395
+ usage == SHADER_OUTPUT_TYPE_RENDER_TARGET_ARRAY_INDEX ||
396
+ usage == SHADER_OUTPUT_TYPE_COARSE_PIXEL_SIZE)
397
+ {
398
+ context->getModuleMetaData ()->URBInfo .hasVertexHeader = true ;
399
+ if (m_headerSize < QuadEltUnit (2 ))
400
+ {
401
+ m_headerSize = QuadEltUnit (2 );
402
+ }
403
+ }
391
404
}
392
405
}
393
406
}
Original file line number Diff line number Diff line change @@ -758,8 +758,10 @@ namespace IGC
758
758
759
759
auto clipCullAsInput = false ;
760
760
IGC::CodeGenContext* ctx = getAnalysis<CodeGenContextWrapper>().getCodeGenContext ();
761
- if (ctx->getModuleMetaData ()->URBInfo .has64BVertexHeaderInput ) {
761
+ if (ctx->getModuleMetaData ()->URBInfo .has64BVertexHeaderInput )
762
+ {
762
763
// In case we have no linking information we need the URB header to have a fixed size
764
+ IGC_ASSERT (ctx->getModuleMetaData ()->URBInfo .hasVertexHeader );
763
765
clipCullAsInput = true ;
764
766
}
765
767
Original file line number Diff line number Diff line change @@ -556,9 +556,22 @@ namespace IGC
556
556
if (usage == SHADER_OUTPUT_TYPE_CLIPDISTANCE_LO ||
557
557
usage == SHADER_OUTPUT_TYPE_CLIPDISTANCE_HI)
558
558
{
559
+ m_context->getModuleMetaData ()->URBInfo .hasVertexHeader = true ;
560
+ m_context->getModuleMetaData ()->URBInfo .has64BVertexHeaderOutput = true ;
559
561
m_headerSize = QuadEltUnit (4 );
560
562
m_vsPropsPass->DeclareClipDistance ();
561
563
}
564
+ else if (usage == SHADER_OUTPUT_TYPE_POSITION ||
565
+ usage == SHADER_OUTPUT_TYPE_POINTWIDTH ||
566
+ usage == SHADER_OUTPUT_TYPE_RENDER_TARGET_ARRAY_INDEX ||
567
+ usage == SHADER_OUTPUT_TYPE_COARSE_PIXEL_SIZE)
568
+ {
569
+ m_context->getModuleMetaData ()->URBInfo .hasVertexHeader = true ;
570
+ if (m_headerSize < QuadEltUnit (2 ))
571
+ {
572
+ m_headerSize = QuadEltUnit (2 );
573
+ }
574
+ }
562
575
}
563
576
}
564
577
}
You can’t perform that action at this time.
0 commit comments