|
@@ -266,7 +266,7 @@ const char *hlsl::GetValidationRuleText(ValidationRule value) {
|
|
|
case hlsl::ValidationRule::SmMeshShaderPayloadSize: return "For shader '%0', payload size is greater than %1";
|
|
|
case hlsl::ValidationRule::SmMeshShaderPayloadSizeDeclared: return "For shader '%0', payload size %1 is greater than declared size of %2 bytes";
|
|
|
case hlsl::ValidationRule::SmMeshShaderOutputSize: return "For shader '%0', vertex plus primitive output size is greater than %1";
|
|
|
- case hlsl::ValidationRule::SmMeshShaderInOutSize: return "For shader '%0', input plus output size is greater than %1";
|
|
|
+ case hlsl::ValidationRule::SmMeshShaderInOutSize: return "For shader '%0', payload plus output size is greater than %1";
|
|
|
case hlsl::ValidationRule::SmMeshVSigRowCount: return "For shader '%0', vertex output signatures are taking up more than %1 rows";
|
|
|
case hlsl::ValidationRule::SmMeshPSigRowCount: return "For shader '%0', primitive output signatures are taking up more than %1 rows";
|
|
|
case hlsl::ValidationRule::SmMeshTotalSigRowCount: return "For shader '%0', vertex and primitive output signatures are taking up more than %1 rows";
|
|
@@ -2890,10 +2890,10 @@ static void ValidateMsIntrinsics(Function *F,
|
|
|
|
|
|
DxilFunctionProps &prop = ValCtx.DxilMod.GetDxilFunctionProps(F);
|
|
|
|
|
|
- if (payloadSize > DXIL::kMaxMSASPayloadSize ||
|
|
|
- prop.ShaderProps.MS.payloadSizeInBytes > DXIL::kMaxMSASPayloadSize) {
|
|
|
+ if (payloadSize > DXIL::kMaxMSASPayloadBytes ||
|
|
|
+ prop.ShaderProps.MS.payloadSizeInBytes > DXIL::kMaxMSASPayloadBytes) {
|
|
|
ValCtx.EmitFormatError(ValidationRule::SmMeshShaderPayloadSize,
|
|
|
- { F->getName(), std::to_string(DXIL::kMaxMSASPayloadSize) });
|
|
|
+ { F->getName(), std::to_string(DXIL::kMaxMSASPayloadBytes) });
|
|
|
}
|
|
|
|
|
|
if (prop.ShaderProps.MS.payloadSizeInBytes < payloadSize) {
|
|
@@ -2919,11 +2919,11 @@ static void ValidateAsIntrinsics(Function *F, ValidationContext &ValCtx, CallIns
|
|
|
|
|
|
DxilFunctionProps &prop = ValCtx.DxilMod.GetDxilFunctionProps(F);
|
|
|
|
|
|
- if (payloadSize > DXIL::kMaxMSASPayloadSize ||
|
|
|
- prop.ShaderProps.AS.payloadSizeInBytes > DXIL::kMaxMSASPayloadSize) {
|
|
|
+ if (payloadSize > DXIL::kMaxMSASPayloadBytes ||
|
|
|
+ prop.ShaderProps.AS.payloadSizeInBytes > DXIL::kMaxMSASPayloadBytes) {
|
|
|
ValCtx.EmitFormatError(
|
|
|
ValidationRule::SmAmplificationShaderPayloadSize,
|
|
|
- {F->getName(), std::to_string(DXIL::kMaxMSASPayloadSize)});
|
|
|
+ {F->getName(), std::to_string(DXIL::kMaxMSASPayloadBytes)});
|
|
|
}
|
|
|
|
|
|
if (prop.ShaderProps.AS.payloadSizeInBytes < payloadSize) {
|
|
@@ -2957,9 +2957,9 @@ static void ValidateAsIntrinsics(Function *F, ValidationContext &ValCtx, CallIns
|
|
|
const DataLayout &DL = F->getParent()->getDataLayout();
|
|
|
unsigned payloadSize = DL.getTypeAllocSize(payloadTy);
|
|
|
|
|
|
- if (payloadSize > DXIL::kMaxMSASPayloadSize) {
|
|
|
+ if (payloadSize > DXIL::kMaxMSASPayloadBytes) {
|
|
|
ValCtx.EmitFormatError(ValidationRule::SmAmplificationShaderPayloadSize,
|
|
|
- { F->getName(), std::to_string(DXIL::kMaxMSASPayloadSize) });
|
|
|
+ { F->getName(), std::to_string(DXIL::kMaxMSASPayloadBytes) });
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -4985,17 +4985,17 @@ static void ValidateEntrySignatures(ValidationContext &ValCtx,
|
|
|
totalOutputScalars += SE->GetRows() * SE->GetCols() * maxPrimitiveCount;
|
|
|
}
|
|
|
|
|
|
- if (totalOutputScalars > DXIL::kMaxMSOutputTotalScalars) {
|
|
|
+ if (totalOutputScalars * 4 > DXIL::kMaxMSOutputTotalBytes) {
|
|
|
ValCtx.EmitFormatError(
|
|
|
ValidationRule::SmMeshShaderOutputSize,
|
|
|
- { F.getName(), std::to_string(DXIL::kMaxMSOutputTotalScalars) });
|
|
|
+ { F.getName(), std::to_string(DXIL::kMaxMSOutputTotalBytes) });
|
|
|
}
|
|
|
|
|
|
unsigned totalInputOutputScalars = totalOutputScalars + props.ShaderProps.MS.payloadSizeInBytes;
|
|
|
- if (totalInputOutputScalars > DXIL::kMaxMSInputOutputTotalScalars) {
|
|
|
+ if (totalInputOutputScalars * 4 > DXIL::kMaxMSInputOutputTotalBytes) {
|
|
|
ValCtx.EmitFormatError(
|
|
|
ValidationRule::SmMeshShaderInOutSize,
|
|
|
- { F.getName(), std::to_string(DXIL::kMaxMSInputOutputTotalScalars) });
|
|
|
+ { F.getName(), std::to_string(DXIL::kMaxMSInputOutputTotalBytes) });
|
|
|
}
|
|
|
}
|
|
|
}
|