@@ -303,10 +303,13 @@ void GatherPSInputDataForInitialValues(const DXBC::DXBCContainer *dxbc,
303
303
fetcher.hlsl += " : " + name;
304
304
// DXIL does not allow redeclaring SV_ variables, any that we might need which could already be
305
305
// in PSInput must be obtained from there and not redeclared in our entry point
306
- if (sig.systemValue == ShaderBuiltin::Position)
307
- defines += " #define POSITION_VAR " + inputName + " \n " ;
308
- else if (sig.systemValue == ShaderBuiltin::PrimitiveIndex)
309
- defines += " #define PRIM_VAR " + inputName + " \n " ;
306
+ if (included)
307
+ {
308
+ if (sig.systemValue == ShaderBuiltin::Position)
309
+ defines += " #define POSITION_VAR " + inputName + " \n " ;
310
+ else if (sig.systemValue == ShaderBuiltin::PrimitiveIndex)
311
+ defines += " #define PRIM_VAR " + inputName + " \n " ;
312
+ }
310
313
311
314
inputVarNames[i] = inputName;
312
315
if (arrayLength > 0 )
@@ -446,7 +449,7 @@ void ExtractInputsPS(PSInput IN,
446
449
#if USEPRIM && !defined(PRIM_VAR)
447
450
uint primitive : SV_PrimitiveID,
448
451
#endif
449
- // sample, coverage and isFrontFace are deliberately omittted from the
452
+ // sample, coverage and isFrontFace are deliberately omitted from the
450
453
// IN struct for SV_ ordering reasons
451
454
uint sample : SV_SampleIndex,
452
455
uint coverage : SV_Coverage,
0 commit comments