|
@@ -2365,7 +2365,7 @@ class db_dxil(object):
|
|
|
self.interpretation_table = table
|
|
|
|
|
|
def build_valrules(self):
|
|
|
- self.add_valrule_msg("Bitcode.Valid", "TODO - Module must be bitcode-valid", "Module bitcode is invalid")
|
|
|
+ self.add_valrule_msg("Bitcode.Valid", "TODO - Module must be bitcode-valid", "Module bitcode is invalid.")
|
|
|
|
|
|
self.add_valrule_msg("Container.PartMatches", "DXIL Container Parts must match Module", "Container part '%0' does not match expected for module.")
|
|
|
self.add_valrule_msg("Container.PartRepeated", "DXIL Container must have only one of each part type", "More than one container part '%0'.")
|
|
@@ -2373,24 +2373,24 @@ class db_dxil(object):
|
|
|
self.add_valrule_msg("Container.PartInvalid", "DXIL Container must not contain unknown parts", "Unknown part '%0' found in DXIL container.")
|
|
|
self.add_valrule_msg("Container.RootSignatureIncompatible", "Root Signature in DXIL Container must be compatible with shader", "Root Signature in DXIL container is not compatible with shader.")
|
|
|
|
|
|
- self.add_valrule("Meta.Required", "TODO - Required metadata missing")
|
|
|
- self.add_valrule_msg("Meta.Known", "Named metadata should be known", "Named metadata '%0' is unknown")
|
|
|
- self.add_valrule("Meta.Used", "All metadata must be used by dxil")
|
|
|
- self.add_valrule_msg("Meta.Target", "Target triple must be 'dxil-ms-dx'", "Unknown target triple '%0'")
|
|
|
- self.add_valrule("Meta.WellFormed", "TODO - Metadata must be well-formed in operand count and types")
|
|
|
- self.add_valrule("Meta.SemanticLen", "Semantic length must be at least 1 and at most 64")
|
|
|
- self.add_valrule_msg("Meta.InterpModeValid", "Interpolation mode must be valid", "Invalid interpolation mode for '%0'")
|
|
|
- self.add_valrule_msg("Meta.SemaKindValid", "Semantic kind must be valid", "Semantic kind for '%0' is invalid")
|
|
|
- self.add_valrule_msg("Meta.NoSemanticOverlap", "Semantics must not overlap", "Semantic '%0' overlap at %1")
|
|
|
- self.add_valrule_msg("Meta.SemaKindMatchesName", "Semantic name must match system value, when defined.", "Semantic name %0 does not match System Value kind %1")
|
|
|
+ self.add_valrule("Meta.Required", "TODO - Required metadata missing.")
|
|
|
+ self.add_valrule_msg("Meta.Known", "Named metadata should be known", "Named metadata '%0' is unknown.")
|
|
|
+ self.add_valrule("Meta.Used", "All metadata must be used by dxil.")
|
|
|
+ self.add_valrule_msg("Meta.Target", "Target triple must be 'dxil-ms-dx'", "Unknown target triple '%0'.")
|
|
|
+ self.add_valrule("Meta.WellFormed", "TODO - Metadata must be well-formed in operand count and types.")
|
|
|
+ self.add_valrule("Meta.SemanticLen", "Semantic length must be at least 1 and at most 64.")
|
|
|
+ self.add_valrule_msg("Meta.InterpModeValid", "Interpolation mode must be valid", "Invalid interpolation mode for '%0'.")
|
|
|
+ self.add_valrule_msg("Meta.SemaKindValid", "Semantic kind must be valid", "Semantic kind for '%0' is invalid.")
|
|
|
+ self.add_valrule_msg("Meta.NoSemanticOverlap", "Semantics must not overlap", "Semantic '%0' overlap at %1.")
|
|
|
+ self.add_valrule_msg("Meta.SemaKindMatchesName", "Semantic name must match system value, when defined.", "Semantic name %0 does not match System Value kind %1.")
|
|
|
self.add_valrule_msg("Meta.DuplicateSysValue", "System value may only appear once in signature", "System value %0 appears more than once in the same signature.")
|
|
|
- self.add_valrule_msg("Meta.SemanticIndexMax", "System value semantics have a maximum valid semantic index", "%0 semantic index exceeds maximum (%1)")
|
|
|
- self.add_valrule_msg("Meta.SystemValueRows", "System value may only have 1 row", "rows for system value semantic %0 must be 1")
|
|
|
- self.add_valrule_msg("Meta.SemanticShouldBeAllocated", "Semantic should have a valid packing location", "%0 Semantic '%1' should have a valid packing location")
|
|
|
- self.add_valrule_msg("Meta.SemanticShouldNotBeAllocated", "Semantic should have a packing location of -1", "%0 Semantic '%1' should have a packing location of -1")
|
|
|
- self.add_valrule("Meta.ValueRange", "Metadata value must be within range")
|
|
|
- self.add_valrule("Meta.FlagsUsage", "Flags must match usage")
|
|
|
- self.add_valrule("Meta.DenseResIDs", "Resource identifiers must be zero-based and dense")
|
|
|
+ self.add_valrule_msg("Meta.SemanticIndexMax", "System value semantics have a maximum valid semantic index", "%0 semantic index exceeds maximum (%1).")
|
|
|
+ self.add_valrule_msg("Meta.SystemValueRows", "System value may only have 1 row", "rows for system value semantic %0 must be 1.")
|
|
|
+ self.add_valrule_msg("Meta.SemanticShouldBeAllocated", "Semantic should have a valid packing location", "%0 Semantic '%1' should have a valid packing location.")
|
|
|
+ self.add_valrule_msg("Meta.SemanticShouldNotBeAllocated", "Semantic should have a packing location of -1", "%0 Semantic '%1' should have a packing location of -1.")
|
|
|
+ self.add_valrule("Meta.ValueRange", "Metadata value must be within range.")
|
|
|
+ self.add_valrule("Meta.FlagsUsage", "Flags must match usage.")
|
|
|
+ self.add_valrule("Meta.DenseResIDs", "Resource identifiers must be zero-based and dense.")
|
|
|
self.add_valrule_msg("Meta.SignatureOverlap", "Signature elements may not overlap in packing location.", "signature element %0 at location (%1,%2) size (%3,%4) overlaps another signature element.")
|
|
|
self.add_valrule_msg("Meta.SignatureOutOfRange", "Signature elements must fit within maximum signature size", "signature element %0 at location (%1,%2) size (%3,%4) is out of range.")
|
|
|
self.add_valrule_msg("Meta.SignatureIndexConflict", "Only elements with compatible indexing rules may be packed together", "signature element %0 at location (%1,%2) size (%3,%4) has an indexing conflict with another signature element packed into the same row.")
|
|
@@ -2398,111 +2398,111 @@ class db_dxil(object):
|
|
|
self.add_valrule_msg("Meta.SignatureDataWidth", "Data width must be identical for all elements packed into the same row.", "signature element %0 at location (%1, %2) size (%3, %4) has data width that differs from another element packed into the same row.")
|
|
|
self.add_valrule_msg("Meta.IntegerInterpMode", "Interpolation mode on integer must be Constant", "signature element %0 specifies invalid interpolation mode for integer component type.")
|
|
|
self.add_valrule_msg("Meta.InterpModeInOneRow", "Interpolation mode must be identical for all elements packed into the same row.", "signature element %0 at location (%1,%2) size (%3,%4) has interpolation mode that differs from another element packed into the same row.")
|
|
|
- self.add_valrule("Meta.SemanticCompType", "%0 must be %1")
|
|
|
+ self.add_valrule("Meta.SemanticCompType", "%0 must be %1.")
|
|
|
self.add_valrule_msg("Meta.ClipCullMaxRows", "Combined elements of SV_ClipDistance and SV_CullDistance must fit in two rows.", "ClipDistance and CullDistance occupy more than the maximum of 2 rows combined.")
|
|
|
self.add_valrule_msg("Meta.ClipCullMaxComponents", "Combined elements of SV_ClipDistance and SV_CullDistance must fit in 8 components", "ClipDistance and CullDistance use more than the maximum of 8 components combined.")
|
|
|
- self.add_valrule("Meta.SignatureCompType", "signature %0 specifies unrecognized or invalid component type")
|
|
|
+ self.add_valrule("Meta.SignatureCompType", "signature %0 specifies unrecognized or invalid component type.")
|
|
|
self.add_valrule("Meta.TessellatorPartition", "Invalid Tessellator Partitioning specified. Must be integer, pow2, fractional_odd or fractional_even.")
|
|
|
self.add_valrule("Meta.TessellatorOutputPrimitive", "Invalid Tessellator Output Primitive specified. Must be point, line, triangleCW or triangleCCW.")
|
|
|
- self.add_valrule("Meta.MaxTessFactor", "Hull Shader MaxTessFactor must be [%0..%1]. %2 specified")
|
|
|
- self.add_valrule("Meta.ValidSamplerMode", "Invalid sampler mode on sampler ")
|
|
|
- self.add_valrule("Meta.GlcNotOnAppendConsume", "globallycoherent cannot be used with append/consume buffers")
|
|
|
- self.add_valrule_msg("Meta.StructBufAlignment", "StructuredBuffer stride not aligned","structured buffer element size must be a multiple of %0 bytes (actual size %1 bytes)")
|
|
|
- self.add_valrule_msg("Meta.StructBufAlignmentOutOfBound", "StructuredBuffer stride out of bounds","structured buffer elements cannot be larger than %0 bytes (actual size %1 bytes)")
|
|
|
- self.add_valrule("Meta.EntryFunction", "entrypoint not found")
|
|
|
- self.add_valrule("Meta.InvalidControlFlowHint", "Invalid control flow hint")
|
|
|
- self.add_valrule("Meta.BranchFlatten", "Can't use branch and flatten attributes together")
|
|
|
- self.add_valrule("Meta.ForceCaseOnSwitch", "Attribute forcecase only works for switch")
|
|
|
- self.add_valrule("Meta.ControlFlowHintNotOnControlFlow", "Control flow hint only works on control flow inst")
|
|
|
- self.add_valrule("Meta.TextureType", "elements of typed buffers and textures must fit in four 32-bit quantities")
|
|
|
- self.add_valrule("Meta.BarycentricsInterpolation", "SV_Barycentrics cannot be used with 'nointerpolation' type")
|
|
|
+ self.add_valrule("Meta.MaxTessFactor", "Hull Shader MaxTessFactor must be [%0..%1]. %2 specified.")
|
|
|
+ self.add_valrule("Meta.ValidSamplerMode", "Invalid sampler mode on sampler .")
|
|
|
+ self.add_valrule("Meta.GlcNotOnAppendConsume", "globallycoherent cannot be used with append/consume buffers: '%0'.")
|
|
|
+ self.add_valrule_msg("Meta.StructBufAlignment", "StructuredBuffer stride not aligned","structured buffer element size must be a multiple of %0 bytes (actual size %1 bytes).")
|
|
|
+ self.add_valrule_msg("Meta.StructBufAlignmentOutOfBound", "StructuredBuffer stride out of bounds","structured buffer elements cannot be larger than %0 bytes (actual size %1 bytes).")
|
|
|
+ self.add_valrule("Meta.EntryFunction", "entrypoint not found.")
|
|
|
+ self.add_valrule("Meta.InvalidControlFlowHint", "Invalid control flow hint.")
|
|
|
+ self.add_valrule("Meta.BranchFlatten", "Can't use branch and flatten attributes together.")
|
|
|
+ self.add_valrule("Meta.ForceCaseOnSwitch", "Attribute forcecase only works for switch.")
|
|
|
+ self.add_valrule("Meta.ControlFlowHintNotOnControlFlow", "Control flow hint only works on control flow inst.")
|
|
|
+ self.add_valrule("Meta.TextureType", "elements of typed buffers and textures must fit in four 32-bit quantities.")
|
|
|
+ self.add_valrule("Meta.BarycentricsInterpolation", "SV_Barycentrics cannot be used with 'nointerpolation' type.")
|
|
|
self.add_valrule("Meta.BarycentricsFloat3", "only 'float3' type is allowed for SV_Barycentrics.")
|
|
|
self.add_valrule("Meta.BarycentricsTwoPerspectives", "There can only be up to two input attributes of SV_Barycentrics with different perspective interpolation mode.")
|
|
|
- self.add_valrule("Meta.NoEntryPropsForEntry", "EntryPoints must have entry properties.")
|
|
|
-
|
|
|
- self.add_valrule("Instr.Oload", "DXIL intrinsic overload must be valid")
|
|
|
- self.add_valrule_msg("Instr.CallOload", "Call to DXIL intrinsic must match overload signature", "Call to DXIL intrinsic '%0' does not match an allowed overload signature")
|
|
|
- self.add_valrule("Instr.PtrBitCast", "Pointer type bitcast must be have same size")
|
|
|
- self.add_valrule("Instr.MinPrecisonBitCast", "Bitcast on minprecison types is not allowed")
|
|
|
- self.add_valrule("Instr.StructBitCast", "Bitcast on struct types is not allowed")
|
|
|
- self.add_valrule("Instr.Status", "Resource status should only used by CheckAccessFullyMapped")
|
|
|
- self.add_valrule("Instr.CheckAccessFullyMapped", "CheckAccessFullyMapped should only used on resource status")
|
|
|
- self.add_valrule_msg("Instr.OpConst", "DXIL intrinsic requires an immediate constant operand", "%0 of %1 must be an immediate constant")
|
|
|
- self.add_valrule("Instr.Allowed", "Instructions must be of an allowed type")
|
|
|
- self.add_valrule("Instr.OpCodeReserved", "Instructions must not reference reserved opcodes")
|
|
|
- self.add_valrule_msg("Instr.OperandRange", "DXIL intrinsic operand must be within defined range", "expect %0 between %1, got %2")
|
|
|
- self.add_valrule("Instr.NoReadingUninitialized", "Instructions should not read uninitialized value")
|
|
|
- self.add_valrule("Instr.NoGenericPtrAddrSpaceCast", "Address space cast between pointer types must have one part to be generic address space")
|
|
|
- self.add_valrule("Instr.InBoundsAccess", "Access to out-of-bounds memory is disallowed")
|
|
|
- self.add_valrule("Instr.OpConstRange", "Constant values must be in-range for operation")
|
|
|
- self.add_valrule("Instr.ImmBiasForSampleB", "bias amount for sample_b must be in the range [%0,%1], but %2 was specified as an immediate")
|
|
|
+ self.add_valrule("Meta.NoEntryPropsForEntry", "Entry point %0 must have entry properties.")
|
|
|
+
|
|
|
+ self.add_valrule("Instr.Oload", "DXIL intrinsic overload must be valid.")
|
|
|
+ self.add_valrule_msg("Instr.CallOload", "Call to DXIL intrinsic must match overload signature", "Call to DXIL intrinsic '%0' does not match an allowed overload signature.")
|
|
|
+ self.add_valrule("Instr.PtrBitCast", "Pointer type bitcast must be have same size.")
|
|
|
+ self.add_valrule("Instr.MinPrecisonBitCast", "Bitcast on minprecison types is not allowed.")
|
|
|
+ self.add_valrule("Instr.StructBitCast", "Bitcast on struct types is not allowed.")
|
|
|
+ self.add_valrule("Instr.Status", "Resource status should only be used by CheckAccessFullyMapped.")
|
|
|
+ self.add_valrule("Instr.CheckAccessFullyMapped", "CheckAccessFullyMapped should only be used on resource status.")
|
|
|
+ self.add_valrule_msg("Instr.OpConst", "DXIL intrinsic requires an immediate constant operand", "%0 of %1 must be an immediate constant.")
|
|
|
+ self.add_valrule("Instr.Allowed", "Instructions must be of an allowed type.")
|
|
|
+ self.add_valrule("Instr.OpCodeReserved", "Instructions must not reference reserved opcodes.")
|
|
|
+ self.add_valrule_msg("Instr.OperandRange", "DXIL intrinsic operand must be within defined range", "expect %0 between %1, got %2.")
|
|
|
+ self.add_valrule("Instr.NoReadingUninitialized", "Instructions should not read uninitialized value.")
|
|
|
+ self.add_valrule("Instr.NoGenericPtrAddrSpaceCast", "Address space cast between pointer types must have one part to be generic address space.")
|
|
|
+ self.add_valrule("Instr.InBoundsAccess", "Access to out-of-bounds memory is disallowed.")
|
|
|
+ self.add_valrule("Instr.OpConstRange", "Constant values must be in-range for operation.")
|
|
|
+ self.add_valrule("Instr.ImmBiasForSampleB", "bias amount for sample_b must be in the range [%0,%1], but %2 was specified as an immediate.")
|
|
|
# If streams have not been declared, you must use cut instead of cut_stream in GS - is there an equivalent rule here?
|
|
|
|
|
|
# Need to clean up all error messages and actually implement.
|
|
|
# Midlevel
|
|
|
- self.add_valrule("Instr.NoIndefiniteLog", "No indefinite logarithm")
|
|
|
- self.add_valrule("Instr.NoIndefiniteAsin", "No indefinite arcsine")
|
|
|
- self.add_valrule("Instr.NoIndefiniteAcos", "No indefinite arccosine")
|
|
|
- self.add_valrule("Instr.NoIDivByZero", "No signed integer division by zero")
|
|
|
- self.add_valrule("Instr.NoUDivByZero", "No unsigned integer division by zero")
|
|
|
- self.add_valrule("Instr.NoIndefiniteDsxy", "No indefinite derivative calculation")
|
|
|
- self.add_valrule("Instr.MinPrecisionNotPrecise", "Instructions marked precise may not refer to minprecision values")
|
|
|
+ self.add_valrule("Instr.NoIndefiniteLog", "No indefinite logarithm.")
|
|
|
+ self.add_valrule("Instr.NoIndefiniteAsin", "No indefinite arcsine.")
|
|
|
+ self.add_valrule("Instr.NoIndefiniteAcos", "No indefinite arccosine.")
|
|
|
+ self.add_valrule("Instr.NoIDivByZero", "No signed integer division by zero.")
|
|
|
+ self.add_valrule("Instr.NoUDivByZero", "No unsigned integer division by zero.")
|
|
|
+ self.add_valrule("Instr.NoIndefiniteDsxy", "No indefinite derivative calculation.")
|
|
|
+ self.add_valrule("Instr.MinPrecisionNotPrecise", "Instructions marked precise may not refer to minprecision values.")
|
|
|
|
|
|
# Backend
|
|
|
self.add_valrule("Instr.OnlyOneAllocConsume", "RWStructuredBuffers may increment or decrement their counters, but not both.")
|
|
|
|
|
|
# CCompiler
|
|
|
- self.add_valrule("Instr.TextureOffset", "offset texture instructions must take offset which can resolve to integer literal in the range -8 to 7")
|
|
|
+ self.add_valrule("Instr.TextureOffset", "offset texture instructions must take offset which can resolve to integer literal in the range -8 to 7.")
|
|
|
# D3D12
|
|
|
- self.add_valrule_msg("Instr.CannotPullPosition", "pull-model evaluation of position disallowed", "%0 does not support pull-model evaluation of position")
|
|
|
+ self.add_valrule_msg("Instr.CannotPullPosition", "pull-model evaluation of position disallowed", "%0 does not support pull-model evaluation of position.")
|
|
|
#self.add_valrule("Instr.ERR_GUARANTEED_RACE_CONDITION_UAV", "TODO - race condition writing to shared resource detected, consider making this write conditional.") warning on fxc.
|
|
|
#self.add_valrule("Instr.ERR_GUARANTEED_RACE_CONDITION_GSM", "TODO - race condition writing to shared memory detected, consider making this write conditional.") warning on fxc.
|
|
|
#self.add_valrule("Instr.ERR_INFINITE_LOOP", "TODO - ERR_INFINITE_LOOP") fxc will report error if it can prove the loop is infinite.
|
|
|
- self.add_valrule("Instr.EvalInterpolationMode", "Interpolation mode on %0 used with eval_* instruction must be linear, linear_centroid, linear_noperspective, linear_noperspective_centroid, linear_sample or linear_noperspective_sample")
|
|
|
- self.add_valrule("Instr.ResourceCoordinateMiss", "coord uninitialized")
|
|
|
- self.add_valrule("Instr.ResourceCoordinateTooMany", "out of bound coord must be undef")
|
|
|
- self.add_valrule("Instr.ResourceOffsetMiss", "offset uninitialized")
|
|
|
- self.add_valrule("Instr.ResourceOffsetTooMany", "out of bound offset must be undef")
|
|
|
- self.add_valrule("Instr.UndefResultForGetDimension", "GetDimensions used undef dimension %0 on %1")
|
|
|
- self.add_valrule("Instr.SamplerModeForLOD", "lod instruction requires sampler declared in default mode")
|
|
|
- self.add_valrule("Instr.SamplerModeForSample", "sample/_l/_d/_cl_s/gather instruction requires sampler declared in default mode")
|
|
|
- self.add_valrule("Instr.SamplerModeForSampleC", "sample_c_*/gather_c instructions require sampler declared in comparison mode")
|
|
|
+ self.add_valrule("Instr.EvalInterpolationMode", "Interpolation mode on %0 used with eval_* instruction must be linear, linear_centroid, linear_noperspective, linear_noperspective_centroid, linear_sample or linear_noperspective_sample.")
|
|
|
+ self.add_valrule("Instr.ResourceCoordinateMiss", "coord uninitialized.")
|
|
|
+ self.add_valrule("Instr.ResourceCoordinateTooMany", "out of bound coord must be undef.")
|
|
|
+ self.add_valrule("Instr.ResourceOffsetMiss", "offset uninitialized.")
|
|
|
+ self.add_valrule("Instr.ResourceOffsetTooMany", "out of bound offset must be undef.")
|
|
|
+ self.add_valrule("Instr.UndefResultForGetDimension", "GetDimensions used undef dimension %0 on %1.")
|
|
|
+ self.add_valrule("Instr.SamplerModeForLOD", "lod instruction requires sampler declared in default mode.")
|
|
|
+ self.add_valrule("Instr.SamplerModeForSample", "sample/_l/_d/_cl_s/gather instruction requires sampler declared in default mode.")
|
|
|
+ self.add_valrule("Instr.SamplerModeForSampleC", "sample_c_*/gather_c instructions require sampler declared in comparison mode.")
|
|
|
self.add_valrule("Instr.SampleCompType", "sample_* instructions require resource to be declared to return UNORM, SNORM or FLOAT.")
|
|
|
self.add_valrule("Instr.BarrierModeUselessUGroup", "sync can't specify both _ugroup and _uglobal. If both are needed, just specify _uglobal.")
|
|
|
- self.add_valrule("Instr.BarrierModeNoMemory", "sync must include some form of memory barrier - _u (UAV) and/or _g (Thread Group Shared Memory). Only _t (thread group sync) is optional. ")
|
|
|
- self.add_valrule("Instr.BarrierModeForNonCS", "sync in a non-Compute/Amplification/Mesh Shader must only sync UAV (sync_uglobal)")
|
|
|
- self.add_valrule("Instr.WriteMaskForTypedUAVStore", "store on typed uav must write to all four components of the UAV")
|
|
|
- self.add_valrule("Instr.ResourceKindForCalcLOD","lod requires resource declared as texture1D/2D/3D/Cube/CubeArray/1DArray/2DArray")
|
|
|
- self.add_valrule("Instr.ResourceKindForSample", "sample/_l/_d requires resource declared as texture1D/2D/3D/Cube/1DArray/2DArray/CubeArray")
|
|
|
- self.add_valrule("Instr.ResourceKindForSampleC", "samplec requires resource declared as texture1D/2D/Cube/1DArray/2DArray/CubeArray")
|
|
|
- self.add_valrule("Instr.ResourceKindForGather", "gather requires resource declared as texture/2D/Cube/2DArray/CubeArray")
|
|
|
- self.add_valrule("Instr.WriteMaskMatchValueForUAVStore", "uav store write mask must match store value mask, write mask is %0 and store value mask is %1")
|
|
|
- self.add_valrule("Instr.ResourceKindForBufferLoadStore", "buffer load/store only works on Raw/Typed/StructuredBuffer")
|
|
|
- self.add_valrule("Instr.ResourceKindForTextureStore", "texture store only works on Texture1D/1DArray/2D/2DArray/3D")
|
|
|
- self.add_valrule("Instr.ResourceKindForGetDim", "Invalid resource kind on GetDimensions")
|
|
|
- self.add_valrule("Instr.ResourceKindForTextureLoad", "texture load only works on Texture1D/1DArray/2D/2DArray/3D/MS2D/MS2DArray")
|
|
|
+ self.add_valrule("Instr.BarrierModeNoMemory", "sync must include some form of memory barrier - _u (UAV) and/or _g (Thread Group Shared Memory). Only _t (thread group sync) is optional.")
|
|
|
+ self.add_valrule("Instr.BarrierModeForNonCS", "sync in a non-Compute/Amplification/Mesh Shader must only sync UAV (sync_uglobal).")
|
|
|
+ self.add_valrule("Instr.WriteMaskForTypedUAVStore", "store on typed uav must write to all four components of the UAV.")
|
|
|
+ self.add_valrule("Instr.ResourceKindForCalcLOD","lod requires resource declared as texture1D/2D/3D/Cube/CubeArray/1DArray/2DArray.")
|
|
|
+ self.add_valrule("Instr.ResourceKindForSample", "sample/_l/_d requires resource declared as texture1D/2D/3D/Cube/1DArray/2DArray/CubeArray.")
|
|
|
+ self.add_valrule("Instr.ResourceKindForSampleC", "samplec requires resource declared as texture1D/2D/Cube/1DArray/2DArray/CubeArray.")
|
|
|
+ self.add_valrule("Instr.ResourceKindForGather", "gather requires resource declared as texture/2D/Cube/2DArray/CubeArray.")
|
|
|
+ self.add_valrule("Instr.WriteMaskMatchValueForUAVStore", "uav store write mask must match store value mask, write mask is %0 and store value mask is %1.")
|
|
|
+ self.add_valrule("Instr.ResourceKindForBufferLoadStore", "buffer load/store only works on Raw/Typed/StructuredBuffer.")
|
|
|
+ self.add_valrule("Instr.ResourceKindForTextureStore", "texture store only works on Texture1D/1DArray/2D/2DArray/3D.")
|
|
|
+ self.add_valrule("Instr.ResourceKindForGetDim", "Invalid resource kind on GetDimensions.")
|
|
|
+ self.add_valrule("Instr.ResourceKindForTextureLoad", "texture load only works on Texture1D/1DArray/2D/2DArray/3D/MS2D/MS2DArray.")
|
|
|
self.add_valrule("Instr.ResourceClassForSamplerGather", "sample, lod and gather should be on srv resource.")
|
|
|
self.add_valrule("Instr.ResourceClassForUAVStore", "store should be on uav resource.")
|
|
|
- self.add_valrule("Instr.ResourceClassForLoad", "load can only run on UAV/SRV resource")
|
|
|
- self.add_valrule("Instr.ResourceMapToSingleEntry", "Fail to map resource to resource table")
|
|
|
- self.add_valrule("Instr.ResourceUser", "Resource should only used by Load/GEP/Call")
|
|
|
- self.add_valrule("Instr.ResourceKindForTraceRay", "TraceRay should only use RTAccelerationStructure")
|
|
|
- self.add_valrule("Instr.OffsetOnUAVLoad", "uav load don't support offset")
|
|
|
- self.add_valrule("Instr.MipOnUAVLoad", "uav load don't support mipLevel/sampleIndex")
|
|
|
- self.add_valrule("Instr.SampleIndexForLoad2DMS", "load on Texture2DMS/2DMSArray require sampleIndex")
|
|
|
- self.add_valrule("Instr.CoordinateCountForRawTypedBuf", "raw/typed buffer don't need 2 coordinates")
|
|
|
- self.add_valrule("Instr.CoordinateCountForStructBuf", "structured buffer require 2 coordinates")
|
|
|
- self.add_valrule("Instr.MipLevelForGetDimension", "Use mip level on buffer when GetDimensions")
|
|
|
- self.add_valrule("Instr.DxilStructUser", "Dxil struct types should only used by ExtractValue")
|
|
|
- self.add_valrule("Instr.DxilStructUserOutOfBound", "Index out of bound when extract value from dxil struct types")
|
|
|
- self.add_valrule("Instr.HandleNotFromCreateHandle", "Resource handle should returned by createHandle")
|
|
|
- self.add_valrule("Instr.BufferUpdateCounterOnUAV", "BufferUpdateCounter valid only on UAV")
|
|
|
- self.add_valrule("Instr.BufferUpdateCounterOnResHasCounter", "BufferUpdateCounter valid only when HasCounter is true")
|
|
|
- self.add_valrule("Instr.CBufferOutOfBound", "Cbuffer access out of bound")
|
|
|
- self.add_valrule("Instr.CBufferClassForCBufferHandle", "Expect Cbuffer for CBufferLoad handle")
|
|
|
+ self.add_valrule("Instr.ResourceClassForLoad", "load can only run on UAV/SRV resource.")
|
|
|
+ self.add_valrule("Instr.ResourceMapToSingleEntry", "Fail to map resource to resource table.")
|
|
|
+ self.add_valrule("Instr.ResourceUser", "Resource should only be used by Load/GEP/Call.")
|
|
|
+ self.add_valrule("Instr.ResourceKindForTraceRay", "TraceRay should only use RTAccelerationStructure.")
|
|
|
+ self.add_valrule("Instr.OffsetOnUAVLoad", "uav load don't support offset.")
|
|
|
+ self.add_valrule("Instr.MipOnUAVLoad", "uav load don't support mipLevel/sampleIndex.")
|
|
|
+ self.add_valrule("Instr.SampleIndexForLoad2DMS", "load on Texture2DMS/2DMSArray require sampleIndex.")
|
|
|
+ self.add_valrule("Instr.CoordinateCountForRawTypedBuf", "raw/typed buffer don't need 2 coordinates.")
|
|
|
+ self.add_valrule("Instr.CoordinateCountForStructBuf", "structured buffer require 2 coordinates.")
|
|
|
+ self.add_valrule("Instr.MipLevelForGetDimension", "Use mip level on buffer when GetDimensions.")
|
|
|
+ self.add_valrule("Instr.DxilStructUser", "Dxil struct types should only be used by ExtractValue.")
|
|
|
+ self.add_valrule("Instr.DxilStructUserOutOfBound", "Index out of bound when extract value from dxil struct types.")
|
|
|
+ self.add_valrule("Instr.HandleNotFromCreateHandle", "Resource handle should returned by createHandle.")
|
|
|
+ self.add_valrule("Instr.BufferUpdateCounterOnUAV", "BufferUpdateCounter valid only on UAV.")
|
|
|
+ self.add_valrule("Instr.BufferUpdateCounterOnResHasCounter", "BufferUpdateCounter valid only when HasCounter is true.")
|
|
|
+ self.add_valrule("Instr.CBufferOutOfBound", "Cbuffer access out of bound.")
|
|
|
+ self.add_valrule("Instr.CBufferClassForCBufferHandle", "Expect Cbuffer for CBufferLoad handle.")
|
|
|
self.add_valrule("Instr.FailToResloveTGSMPointer", "TGSM pointers must originate from an unambiguous TGSM global variable.")
|
|
|
- self.add_valrule("Instr.ExtractValue", "ExtractValue should only be used on dxil struct types and cmpxchg")
|
|
|
- self.add_valrule("Instr.TGSMRaceCond", "Race condition writing to shared memory detected, consider making this write conditional")
|
|
|
+ self.add_valrule("Instr.ExtractValue", "ExtractValue should only be used on dxil struct types and cmpxchg.")
|
|
|
+ self.add_valrule("Instr.TGSMRaceCond", "Race condition writing to shared memory detected, consider making this write conditional.")
|
|
|
self.add_valrule("Instr.AttributeAtVertexNoInterpolation", "Attribute %0 must have nointerpolation mode in order to use GetAttributeAtVertex function.")
|
|
|
self.add_valrule("Instr.CreateHandleImmRangeID", "Local resource must map to global resource.")
|
|
|
self.add_valrule("Instr.SignatureOperationNotInEntry", "Dxil operation for input output signature must be in entryPoints.")
|
|
@@ -2520,84 +2520,84 @@ class db_dxil(object):
|
|
|
# - multiple rules regarding interfaces, which isn't a supported feature for DXIL
|
|
|
# - rules for DX9-style intrinsics, which aren't supported for DXIL
|
|
|
|
|
|
- self.add_valrule_msg("Types.NoVector", "Vector types must not be present", "Vector type '%0' is not allowed")
|
|
|
- self.add_valrule_msg("Types.Defined", "Type must be defined based on DXIL primitives", "Type '%0' is not defined on DXIL primitives")
|
|
|
- self.add_valrule_msg("Types.IntWidth", "Int type must be of valid width", "Int type '%0' has an invalid width")
|
|
|
- self.add_valrule("Types.NoMultiDim", "Only one dimension allowed for array type")
|
|
|
- self.add_valrule("Types.NoPtrToPtr", "Pointers to pointers, or pointers in structures are not allowed")
|
|
|
- self.add_valrule("Types.I8", "I8 can only used as immediate value for intrinsic")
|
|
|
-
|
|
|
- self.add_valrule_msg("Sm.Name", "Target shader model name must be known", "Unknown shader model '%0'")
|
|
|
- self.add_valrule_msg("Sm.DxilVersion", "Target shader model requires specific Dxil Version", "Shader model requires Dxil Version %0,%1")
|
|
|
- self.add_valrule_msg("Sm.Opcode", "Opcode must be defined in target shader model", "Opcode %0 not valid in shader model %1")
|
|
|
- self.add_valrule("Sm.Operand", "Operand must be defined in target shader model")
|
|
|
- self.add_valrule_msg("Sm.Semantic", "Semantic must be defined in target shader model", "Semantic '%0' is invalid as %1 %2")
|
|
|
- self.add_valrule_msg("Sm.NoInterpMode", "Interpolation mode must be undefined for VS input/PS output/patch constant.", "Interpolation mode for '%0' is set but should be undefined")
|
|
|
- self.add_valrule_msg("Sm.ConstantInterpMode", "Interpolation mode must be constant for MS primitive output.", "Interpolation mode for '%0' should be constant")
|
|
|
+ self.add_valrule_msg("Types.NoVector", "Vector types must not be present", "Vector type '%0' is not allowed.")
|
|
|
+ self.add_valrule_msg("Types.Defined", "Type must be defined based on DXIL primitives", "Type '%0' is not defined on DXIL primitives.")
|
|
|
+ self.add_valrule_msg("Types.IntWidth", "Int type must be of valid width", "Int type '%0' has an invalid width.")
|
|
|
+ self.add_valrule("Types.NoMultiDim", "Only one dimension allowed for array type.")
|
|
|
+ self.add_valrule("Types.NoPtrToPtr", "Pointers to pointers, or pointers in structures are not allowed.")
|
|
|
+ self.add_valrule("Types.I8", "I8 can only be used as immediate value for intrinsic.")
|
|
|
+
|
|
|
+ self.add_valrule_msg("Sm.Name", "Target shader model name must be known", "Unknown shader model '%0'.")
|
|
|
+ self.add_valrule_msg("Sm.DxilVersion", "Target shader model requires specific Dxil Version", "Shader model requires Dxil Version %0,%1.")
|
|
|
+ self.add_valrule_msg("Sm.Opcode", "Opcode must be defined in target shader model", "Opcode %0 not valid in shader model %1.")
|
|
|
+ self.add_valrule("Sm.Operand", "Operand must be defined in target shader model.")
|
|
|
+ self.add_valrule_msg("Sm.Semantic", "Semantic must be defined in target shader model", "Semantic '%0' is invalid as %1 %2.")
|
|
|
+ self.add_valrule_msg("Sm.NoInterpMode", "Interpolation mode must be undefined for VS input/PS output/patch constant.", "Interpolation mode for '%0' is set but should be undefined.")
|
|
|
+ self.add_valrule_msg("Sm.ConstantInterpMode", "Interpolation mode must be constant for MS primitive output.", "Interpolation mode for '%0' should be constant.")
|
|
|
self.add_valrule("Sm.NoPSOutputIdx", "Pixel shader output registers are not indexable.")# TODO restrict to PS
|
|
|
- self.add_valrule("Sm.PSConsistentInterp", "Interpolation mode for PS input position must be linear_noperspective_centroid or linear_noperspective_sample when outputting oDepthGE or oDepthLE and not running at sample frequency (which is forced by inputting SV_SampleIndex or declaring an input linear_sample or linear_noperspective_sample)")
|
|
|
- self.add_valrule("Sm.ThreadGroupChannelRange", "Declared Thread Group %0 size %1 outside valid range [%2..%3]")
|
|
|
- self.add_valrule("Sm.MaxTheadGroup", "Declared Thread Group Count %0 (X*Y*Z) is beyond the valid maximum of %1")
|
|
|
- self.add_valrule("Sm.MaxTGSMSize", "Total Thread Group Shared Memory storage is %0, exceeded %1")
|
|
|
- self.add_valrule("Sm.ROVOnlyInPS", "RasterizerOrdered objects are only allowed in 5.0+ pixel shaders")
|
|
|
- self.add_valrule("Sm.TessFactorForDomain", "Required TessFactor for domain not found declared anywhere in Patch Constant data")
|
|
|
+ self.add_valrule("Sm.PSConsistentInterp", "Interpolation mode for PS input position must be linear_noperspective_centroid or linear_noperspective_sample when outputting oDepthGE or oDepthLE and not running at sample frequency (which is forced by inputting SV_SampleIndex or declaring an input linear_sample or linear_noperspective_sample).")
|
|
|
+ self.add_valrule("Sm.ThreadGroupChannelRange", "Declared Thread Group %0 size %1 outside valid range [%2..%3].")
|
|
|
+ self.add_valrule("Sm.MaxTheadGroup", "Declared Thread Group Count %0 (X*Y*Z) is beyond the valid maximum of %1.")
|
|
|
+ self.add_valrule("Sm.MaxTGSMSize", "Total Thread Group Shared Memory storage is %0, exceeded %1.")
|
|
|
+ self.add_valrule("Sm.ROVOnlyInPS", "RasterizerOrdered objects are only allowed in 5.0+ pixel shaders.")
|
|
|
+ self.add_valrule("Sm.TessFactorForDomain", "Required TessFactor for domain not found declared anywhere in Patch Constant data.")
|
|
|
self.add_valrule("Sm.TessFactorSizeMatchDomain", "TessFactor rows, columns (%0, %1) invalid for domain %2. Expected %3 rows and 1 column.")
|
|
|
self.add_valrule("Sm.InsideTessFactorSizeMatchDomain", "InsideTessFactor rows, columns (%0, %1) invalid for domain %2. Expected %3 rows and 1 column.")
|
|
|
self.add_valrule("Sm.DomainLocationIdxOOB", "DomainLocation component index out of bounds for the domain.")
|
|
|
self.add_valrule("Sm.HullPassThruControlPointCountMatch", "For pass thru hull shader, input control point count must match output control point count");
|
|
|
- self.add_valrule("Sm.OutputControlPointsTotalScalars", "Total number of scalars across all HS output control points must not exceed ")
|
|
|
+ self.add_valrule("Sm.OutputControlPointsTotalScalars", "Total number of scalars across all HS output control points must not exceed .")
|
|
|
self.add_valrule("Sm.IsoLineOutputPrimitiveMismatch", "Hull Shader declared with IsoLine Domain must specify output primitive point or line. Triangle_cw or triangle_ccw output are not compatible with the IsoLine Domain.")
|
|
|
- self.add_valrule("Sm.TriOutputPrimitiveMismatch", "Hull Shader declared with Tri Domain must specify output primitive point, triangle_cw or triangle_ccw. Line output is not compatible with the Tri domain")
|
|
|
- self.add_valrule("Sm.ValidDomain", "Invalid Tessellator Domain specified. Must be isoline, tri or quad")
|
|
|
- self.add_valrule("Sm.PatchConstantOnlyForHSDS", "patch constant signature only valid in HS and DS")
|
|
|
- self.add_valrule("Sm.StreamIndexRange", "Stream index (%0) must between 0 and %1")
|
|
|
- self.add_valrule("Sm.PSOutputSemantic", "Pixel Shader allows output semantics to be SV_Target, SV_Depth, SV_DepthGreaterEqual, SV_DepthLessEqual, SV_Coverage or SV_StencilRef, %0 found")
|
|
|
- self.add_valrule("Sm.PSMultipleDepthSemantic", "Pixel Shader only allows one type of depth semantic to be declared")
|
|
|
- self.add_valrule("Sm.PSTargetIndexMatchesRow", "SV_Target semantic index must match packed row location")
|
|
|
- self.add_valrule("Sm.PSTargetCol0", "SV_Target packed location must start at column 0")
|
|
|
+ self.add_valrule("Sm.TriOutputPrimitiveMismatch", "Hull Shader declared with Tri Domain must specify output primitive point, triangle_cw or triangle_ccw. Line output is not compatible with the Tri domain.")
|
|
|
+ self.add_valrule("Sm.ValidDomain", "Invalid Tessellator Domain specified. Must be isoline, tri or quad.")
|
|
|
+ self.add_valrule("Sm.PatchConstantOnlyForHSDS", "patch constant signature only valid in HS and DS.")
|
|
|
+ self.add_valrule("Sm.StreamIndexRange", "Stream index (%0) must between 0 and %1.")
|
|
|
+ self.add_valrule("Sm.PSOutputSemantic", "Pixel Shader allows output semantics to be SV_Target, SV_Depth, SV_DepthGreaterEqual, SV_DepthLessEqual, SV_Coverage or SV_StencilRef, %0 found.")
|
|
|
+ self.add_valrule("Sm.PSMultipleDepthSemantic", "Pixel Shader only allows one type of depth semantic to be declared.")
|
|
|
+ self.add_valrule("Sm.PSTargetIndexMatchesRow", "SV_Target semantic index must match packed row location.")
|
|
|
+ self.add_valrule("Sm.PSTargetCol0", "SV_Target packed location must start at column 0.")
|
|
|
self.add_valrule("Sm.PSCoverageAndInnerCoverage", "InnerCoverage and Coverage are mutually exclusive.")
|
|
|
- self.add_valrule("Sm.GSOutputVertexCountRange", "GS output vertex count must be [0..%0]. %1 specified")
|
|
|
- self.add_valrule("Sm.GSInstanceCountRange", "GS instance count must be [1..%0]. %1 specified")
|
|
|
- self.add_valrule("Sm.DSInputControlPointCountRange", "DS input control point count must be [0..%0]. %1 specified")
|
|
|
- self.add_valrule("Sm.HSInputControlPointCountRange", "HS input control point count must be [0..%0]. %1 specified")
|
|
|
- self.add_valrule("Sm.ZeroHSInputControlPointWithInput", "When HS input control point count is 0, no input signature should exist")
|
|
|
- self.add_valrule("Sm.OutputControlPointCountRange", "output control point count must be [0..%0]. %1 specified")
|
|
|
- self.add_valrule("Sm.GSValidInputPrimitive", "GS input primitive unrecognized")
|
|
|
- self.add_valrule("Sm.GSValidOutputPrimitiveTopology", "GS output primitive topology unrecognized")
|
|
|
+ self.add_valrule("Sm.GSOutputVertexCountRange", "GS output vertex count must be [0..%0]. %1 specified.")
|
|
|
+ self.add_valrule("Sm.GSInstanceCountRange", "GS instance count must be [1..%0]. %1 specified.")
|
|
|
+ self.add_valrule("Sm.DSInputControlPointCountRange", "DS input control point count must be [0..%0]. %1 specified.")
|
|
|
+ self.add_valrule("Sm.HSInputControlPointCountRange", "HS input control point count must be [0..%0]. %1 specified.")
|
|
|
+ self.add_valrule("Sm.ZeroHSInputControlPointWithInput", "When HS input control point count is 0, no input signature should exist.")
|
|
|
+ self.add_valrule("Sm.OutputControlPointCountRange", "output control point count must be [0..%0]. %1 specified.")
|
|
|
+ self.add_valrule("Sm.GSValidInputPrimitive", "GS input primitive unrecognized.")
|
|
|
+ self.add_valrule("Sm.GSValidOutputPrimitiveTopology", "GS output primitive topology unrecognized.")
|
|
|
self.add_valrule("Sm.AppendAndConsumeOnSameUAV", "BufferUpdateCounter inc and dec on a given UAV (%d) cannot both be in the same shader for shader model less than 5.1.")
|
|
|
- self.add_valrule("Sm.InvalidTextureKindOnUAV", "Texture2DMS[Array] or TextureCube[Array] resources are not supported with UAVs")
|
|
|
- self.add_valrule("Sm.InvalidResourceKind", "Invalid resources kind")
|
|
|
- self.add_valrule("Sm.InvalidResourceCompType","Invalid resource return type")
|
|
|
- self.add_valrule("Sm.InvalidSamplerFeedbackType","Invalid sampler feedback type")
|
|
|
- self.add_valrule("Sm.SampleCountOnlyOn2DMS","Only Texture2DMS/2DMSArray could has sample count")
|
|
|
- self.add_valrule("Sm.CounterOnlyOnStructBuf", "BufferUpdateCounter valid only on structured buffers")
|
|
|
- self.add_valrule("Sm.GSTotalOutputVertexDataRange", "Declared output vertex count (%0) multiplied by the total number of declared scalar components of output data (%1) equals %2. This value cannot be greater than %3")
|
|
|
- self.add_valrule_msg("Sm.MultiStreamMustBePoint", "When multiple GS output streams are used they must be pointlists", "Multiple GS output streams are used but '%0' is not pointlist")
|
|
|
- self.add_valrule("Sm.CompletePosition", "Not all elements of SV_Position were written")
|
|
|
- self.add_valrule("Sm.UndefinedOutput", "Not all elements of output %0 were written")
|
|
|
+ self.add_valrule("Sm.InvalidTextureKindOnUAV", "Texture2DMS[Array] or TextureCube[Array] resources are not supported with UAVs.")
|
|
|
+ self.add_valrule("Sm.InvalidResourceKind", "Invalid resources kind.")
|
|
|
+ self.add_valrule("Sm.InvalidResourceCompType","Invalid resource return type.")
|
|
|
+ self.add_valrule("Sm.InvalidSamplerFeedbackType","Invalid sampler feedback type.")
|
|
|
+ self.add_valrule("Sm.SampleCountOnlyOn2DMS","Only Texture2DMS/2DMSArray could has sample count.")
|
|
|
+ self.add_valrule("Sm.CounterOnlyOnStructBuf", "BufferUpdateCounter valid only on structured buffers.")
|
|
|
+ self.add_valrule("Sm.GSTotalOutputVertexDataRange", "Declared output vertex count (%0) multiplied by the total number of declared scalar components of output data (%1) equals %2. This value cannot be greater than %3.")
|
|
|
+ self.add_valrule_msg("Sm.MultiStreamMustBePoint", "When multiple GS output streams are used they must be pointlists", "Multiple GS output streams are used but '%0' is not pointlist.")
|
|
|
+ self.add_valrule("Sm.CompletePosition", "Not all elements of SV_Position were written.")
|
|
|
+ self.add_valrule("Sm.UndefinedOutput", "Not all elements of output %0 were written.")
|
|
|
self.add_valrule("Sm.CSNoSignatures", "Compute shaders must not have shader signatures.")
|
|
|
- self.add_valrule("Sm.CBufferTemplateTypeMustBeStruct", "D3D12 constant/texture buffer template element can only be a struct")
|
|
|
- self.add_valrule_msg("Sm.ResourceRangeOverlap", "Resource ranges must not overlap", "Resource %0 with base %1 size %2 overlap with other resource with base %3 size %4 in space %5")
|
|
|
- self.add_valrule_msg("Sm.CBufferOffsetOverlap", "CBuffer offsets must not overlap", "CBuffer %0 has offset overlaps at %1")
|
|
|
- self.add_valrule_msg("Sm.CBufferElementOverflow", "CBuffer elements must not overflow", "CBuffer %0 size insufficient for element at offset %1")
|
|
|
- self.add_valrule_msg("Sm.CBufferArrayOffsetAlignment", "CBuffer array offset must be aligned to 16-bytes", "CBuffer %0 has unaligned array offset at %1")
|
|
|
- self.add_valrule_msg("Sm.OpcodeInInvalidFunction", "Invalid DXIL opcode usage like StorePatchConstant in patch constant function", "opcode '%0' should only be used in '%1'")
|
|
|
- self.add_valrule_msg("Sm.ViewIDNeedsSlot", "ViewID requires compatible space in pixel shader input signature", "Pixel shader input signature lacks available space for ViewID")
|
|
|
- self.add_valrule("Sm.64bitRawBufferLoadStore", "i64/f64 rawBufferLoad/Store overloads are allowed after SM 6.3")
|
|
|
- self.add_valrule("Sm.RayShaderSignatures", "Ray tracing shader '%0' should not have any shader signatures")
|
|
|
- self.add_valrule("Sm.RayShaderPayloadSize", "For shader '%0', %1 size is smaller than argument's allocation size")
|
|
|
- self.add_valrule("Sm.MeshShaderMaxVertexCount", "MS max vertex output count must be [0..%0]. %1 specified")
|
|
|
- self.add_valrule("Sm.MeshShaderMaxPrimitiveCount", "MS max primitive output count must be [0..%0]. %1 specified")
|
|
|
- self.add_valrule("Sm.MeshShaderPayloadSize", "For shader '%0', payload size is greater than %1")
|
|
|
- self.add_valrule("Sm.MeshShaderPayloadSizeDeclared", "For shader '%0', payload size %1 is greater than declared size of %2 bytes")
|
|
|
- self.add_valrule("Sm.MeshShaderOutputSize", "For shader '%0', vertex plus primitive output size is greater than %1")
|
|
|
- self.add_valrule("Sm.MeshShaderInOutSize", "For shader '%0', payload plus output size is greater than %1")
|
|
|
- self.add_valrule("Sm.MeshVSigRowCount", "For shader '%0', vertex output signatures are taking up more than %1 rows")
|
|
|
- self.add_valrule("Sm.MeshPSigRowCount", "For shader '%0', primitive output signatures are taking up more than %1 rows")
|
|
|
- self.add_valrule("Sm.MeshTotalSigRowCount", "For shader '%0', vertex and primitive output signatures are taking up more than %1 rows")
|
|
|
- self.add_valrule("Sm.MaxMSSMSize", "Total Thread Group Shared Memory storage is %0, exceeded %1")
|
|
|
- self.add_valrule("Sm.AmplificationShaderPayloadSize", "For shader '%0', payload size is greater than %1")
|
|
|
- self.add_valrule("Sm.AmplificationShaderPayloadSizeDeclared", "For shader '%0', payload size %1 is greater than declared size of %2 bytes")
|
|
|
+ self.add_valrule("Sm.CBufferTemplateTypeMustBeStruct", "D3D12 constant/texture buffer template element can only be a struct.")
|
|
|
+ self.add_valrule_msg("Sm.ResourceRangeOverlap", "Resource ranges must not overlap", "Resource %0 with base %1 size %2 overlap with other resource with base %3 size %4 in space %5.")
|
|
|
+ self.add_valrule_msg("Sm.CBufferOffsetOverlap", "CBuffer offsets must not overlap", "CBuffer %0 has offset overlaps at %1.")
|
|
|
+ self.add_valrule_msg("Sm.CBufferElementOverflow", "CBuffer elements must not overflow", "CBuffer %0 size insufficient for element at offset %1.")
|
|
|
+ self.add_valrule_msg("Sm.CBufferArrayOffsetAlignment", "CBuffer array offset must be aligned to 16-bytes", "CBuffer %0 has unaligned array offset at %1.")
|
|
|
+ self.add_valrule_msg("Sm.OpcodeInInvalidFunction", "Invalid DXIL opcode usage like StorePatchConstant in patch constant function", "opcode '%0' should only be used in '%1'.")
|
|
|
+ self.add_valrule_msg("Sm.ViewIDNeedsSlot", "ViewID requires compatible space in pixel shader input signature", "Pixel shader input signature lacks available space for ViewID.")
|
|
|
+ self.add_valrule("Sm.64bitRawBufferLoadStore", "i64/f64 rawBufferLoad/Store overloads are allowed after SM 6.3.")
|
|
|
+ self.add_valrule("Sm.RayShaderSignatures", "Ray tracing shader '%0' should not have any shader signatures.")
|
|
|
+ self.add_valrule("Sm.RayShaderPayloadSize", "For shader '%0', %1 size is smaller than argument's allocation size.")
|
|
|
+ self.add_valrule("Sm.MeshShaderMaxVertexCount", "MS max vertex output count must be [0..%0]. %1 specified.")
|
|
|
+ self.add_valrule("Sm.MeshShaderMaxPrimitiveCount", "MS max primitive output count must be [0..%0]. %1 specified.")
|
|
|
+ self.add_valrule("Sm.MeshShaderPayloadSize", "For mesh shader with entry '%0', payload size %1 is greater than maximum size of %2 bytes.")
|
|
|
+ self.add_valrule("Sm.MeshShaderPayloadSizeDeclared", "For mesh shader with entry '%0', payload size %1 is greater than declared size of %2 bytes.")
|
|
|
+ self.add_valrule("Sm.MeshShaderOutputSize", "For shader '%0', vertex plus primitive output size is greater than %1.")
|
|
|
+ self.add_valrule("Sm.MeshShaderInOutSize", "For shader '%0', payload plus output size is greater than %1.")
|
|
|
+ self.add_valrule("Sm.MeshVSigRowCount", "For shader '%0', vertex output signatures are taking up more than %1 rows.")
|
|
|
+ self.add_valrule("Sm.MeshPSigRowCount", "For shader '%0', primitive output signatures are taking up more than %1 rows.")
|
|
|
+ self.add_valrule("Sm.MeshTotalSigRowCount", "For shader '%0', vertex and primitive output signatures are taking up more than %1 rows.")
|
|
|
+ self.add_valrule("Sm.MaxMSSMSize", "Total Thread Group Shared Memory storage is %0, exceeded %1.")
|
|
|
+ self.add_valrule("Sm.AmplificationShaderPayloadSize", "For amplification shader with entry '%0', payload size %1 is greater than maximum size of %2 bytes.")
|
|
|
+ self.add_valrule("Sm.AmplificationShaderPayloadSizeDeclared", "For amplification shader with entry '%0', payload size %1 is greater than declared size of %2 bytes.")
|
|
|
|
|
|
# fxc relaxed check of gradient check.
|
|
|
#self.add_valrule("Uni.NoUniInDiv", "TODO - No instruction requiring uniform execution can be present in divergent block")
|
|
@@ -2605,26 +2605,26 @@ class db_dxil(object):
|
|
|
#self.add_valrule("Uni.ThreadSync", "TODO - Thread sync operation must be in non-varying flow control due to a potential race condition, adding a sync after reading any values controlling shader execution at this point")
|
|
|
#self.add_valrule("Uni.NoWaveSensitiveGradient", "Gradient operations are not affected by wave-sensitive data or control flow.")
|
|
|
|
|
|
- self.add_valrule("Flow.Reducible", "Execution flow must be reducible")
|
|
|
- self.add_valrule("Flow.NoRecusion", "Recursion is not permitted")
|
|
|
- self.add_valrule("Flow.DeadLoop", "Loop must have break")
|
|
|
- self.add_valrule_msg("Flow.FunctionCall", "Function with parameter is not permitted", "Function %0 with parameter is not permitted, it should be inlined")
|
|
|
-
|
|
|
- self.add_valrule_msg("Decl.DxilNsReserved", "The DXIL reserved prefixes must only be used by built-in functions and types", "Declaration '%0' uses a reserved prefix")
|
|
|
- self.add_valrule_msg("Decl.DxilFnExtern", "External function must be a DXIL function", "External function '%0' is not a DXIL function")
|
|
|
- self.add_valrule_msg("Decl.UsedInternal", "Internal declaration must be used", "Internal declaration '%0' is unused")
|
|
|
- self.add_valrule_msg("Decl.NotUsedExternal", "External declaration should not be used", "External declaration '%0' is unused")
|
|
|
- self.add_valrule_msg("Decl.UsedExternalFunction", "External function must be used", "External function '%0' is unused")
|
|
|
- self.add_valrule_msg("Decl.FnIsCalled", "Functions can only be used by call instructions", "Function '%0' is used for something other than calling")
|
|
|
- self.add_valrule_msg("Decl.FnFlattenParam", "Function parameters must not use struct types", "Type '%0' is a struct type but is used as a parameter in function '%1'")
|
|
|
- self.add_valrule_msg("Decl.FnAttribute", "Functions should only contain known function attributes", "Function '%0' contains invalid attribute '%1' with value '%2'")
|
|
|
- self.add_valrule_msg("Decl.ResourceInFnSig", "Resources not allowed in function signatures", "Function '%0' uses resource in function signature")
|
|
|
- self.add_valrule_msg("Decl.PayloadStruct", "Payload parameter must be struct type", "Argument '%0' must be a struct type for payload in shader function '%1'")
|
|
|
- self.add_valrule_msg("Decl.AttrStruct", "Attributes parameter must be struct type", "Argument '%0' must be a struct type for attributes in shader function '%1'")
|
|
|
- self.add_valrule_msg("Decl.ParamStruct", "Callable function parameter must be struct type", "Argument '%0' must be a struct type for callable shader function '%1'")
|
|
|
- self.add_valrule_msg("Decl.ExtraArgs", "Extra arguments not allowed for shader functions", "Extra argument '%0' not allowed for shader function '%1'")
|
|
|
- self.add_valrule_msg("Decl.ShaderReturnVoid", "Shader functions must return void", "Shader function '%0' must have void return type")
|
|
|
- self.add_valrule_msg("Decl.ShaderMissingArg", "payload/params/attributes parameter is required for certain shader types", "%0 shader '%1' missing required %2 parameter")
|
|
|
+ self.add_valrule("Flow.Reducible", "Execution flow must be reducible.")
|
|
|
+ self.add_valrule("Flow.NoRecusion", "Recursion is not permitted.")
|
|
|
+ self.add_valrule("Flow.DeadLoop", "Loop must have break.")
|
|
|
+ self.add_valrule_msg("Flow.FunctionCall", "Function with parameter is not permitted", "Function %0 with parameter is not permitted, it should be inlined.")
|
|
|
+
|
|
|
+ self.add_valrule_msg("Decl.DxilNsReserved", "The DXIL reserved prefixes must only be used by built-in functions and types", "Declaration '%0' uses a reserved prefix.")
|
|
|
+ self.add_valrule_msg("Decl.DxilFnExtern", "External function must be a DXIL function", "External function '%0' is not a DXIL function.")
|
|
|
+ self.add_valrule_msg("Decl.UsedInternal", "Internal declaration must be used", "Internal declaration '%0' is unused.")
|
|
|
+ self.add_valrule_msg("Decl.NotUsedExternal", "External declaration should not be used", "External declaration '%0' is unused.")
|
|
|
+ self.add_valrule_msg("Decl.UsedExternalFunction", "External function must be used", "External function '%0' is unused.")
|
|
|
+ self.add_valrule_msg("Decl.FnIsCalled", "Functions can only be used by call instructions", "Function '%0' is used for something other than calling.")
|
|
|
+ self.add_valrule_msg("Decl.FnFlattenParam", "Function parameters must not use struct types", "Type '%0' is a struct type but is used as a parameter in function '%1'.")
|
|
|
+ self.add_valrule_msg("Decl.FnAttribute", "Functions should only contain known function attributes", "Function '%0' contains invalid attribute '%1' with value '%2'.")
|
|
|
+ self.add_valrule_msg("Decl.ResourceInFnSig", "Resources not allowed in function signatures", "Function '%0' uses resource in function signature.")
|
|
|
+ self.add_valrule_msg("Decl.PayloadStruct", "Payload parameter must be struct type", "Argument '%0' must be a struct type for payload in shader function '%1'.")
|
|
|
+ self.add_valrule_msg("Decl.AttrStruct", "Attributes parameter must be struct type", "Argument '%0' must be a struct type for attributes in shader function '%1'.")
|
|
|
+ self.add_valrule_msg("Decl.ParamStruct", "Callable function parameter must be struct type", "Argument '%0' must be a struct type for callable shader function '%1'.")
|
|
|
+ self.add_valrule_msg("Decl.ExtraArgs", "Extra arguments not allowed for shader functions", "Extra argument '%0' not allowed for shader function '%1'.")
|
|
|
+ self.add_valrule_msg("Decl.ShaderReturnVoid", "Shader functions must return void", "Shader function '%0' must have void return type.")
|
|
|
+ self.add_valrule_msg("Decl.ShaderMissingArg", "payload/params/attributes parameter is required for certain shader types", "%0 shader '%1' missing required %2 parameter.")
|
|
|
|
|
|
# Assign sensible category names and build up an enumeration description
|
|
|
cat_names = {
|