diff options
Diffstat (limited to 'include/spirv-tools/instrument.hpp')
-rw-r--r-- | include/spirv-tools/instrument.hpp | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/include/spirv-tools/instrument.hpp b/include/spirv-tools/instrument.hpp index 01c7c6d1..9711b929 100644 --- a/include/spirv-tools/instrument.hpp +++ b/include/spirv-tools/instrument.hpp @@ -110,6 +110,16 @@ static const int kInstValidationOutError = kInstStageOutCnt; // about the validation error. // // A bindless bounds error will output the index and the bound. +static const int kInstBindlessBoundsOutDescIndex = kInstStageOutCnt + 1; +static const int kInstBindlessBoundsOutDescBound = kInstStageOutCnt + 2; +static const int kInstBindlessBoundsOutCnt = kInstStageOutCnt + 3; + +// A bindless uninitialized error will output the index. +static const int kInstBindlessUninitOutDescIndex = kInstStageOutCnt + 1; +static const int kInstBindlessUninitOutUnused = kInstStageOutCnt + 2; +static const int kInstBindlessUninitOutCnt = kInstStageOutCnt + 3; + +// DEPRECATED static const int kInstBindlessOutDescIndex = kInstStageOutCnt + 1; static const int kInstBindlessOutDescBound = kInstStageOutCnt + 2; static const int kInstBindlessOutCnt = kInstStageOutCnt + 3; @@ -121,6 +131,7 @@ static const int kInstMaxOutCnt = kInstStageOutCnt + 3; // // These are the possible validation error codes. static const int kInstErrorBindlessBounds = 0; +static const int kInstErrorBindlessUninit = 1; // Direct Input Buffer Offsets // @@ -141,11 +152,8 @@ static const int kDebugInputDataOffset = 0; // and possibly other future validations. static const int kDebugOutputBindingStream = 0; -// The binding for the input buffer for InstBindlessCheckPass. The input -// buffer needs only be created if the shaders being validated contain a -// descriptor array of runtime size, and validation of runtime size descriptor -// arrays have been enabled at the time of the bindless validation pass -// creation. +// The binding for the input buffer read by InstBindlessCheckPass and +// possibly other future validations. static const int kDebugInputBindingBindless = 1; // Bindless Validation Input Buffer Format @@ -153,11 +161,19 @@ static const int kDebugInputBindingBindless = 1; // An input buffer for bindless validation consists of a single array of // unsigned integers we will call Data[]. This array is formatted as follows. // -// At the beginning of the array is a single uint reserved for future use. +// At offset kDebugInputBindlessInitOffset in Data[] is a single uint which +// gives an offset to the start of the bindless initialization data. More +// specifically, if the following value is zero, we know that the descriptor at +// (set = s, binding = b, index = i) is not initialized: +// Data[ i + Data[ b + Data[ s + Data[ kDebugInputBindlessInitOffset ] ] ] ] +static const int kDebugInputBindlessInitOffset = 0; + +// DEPRECATED static const int kDebugInputBindlessOffsetReserved = 0; -// Following the reserved uint is some number of uints such that the following -// is true: the number of descriptors at (set=s, binding=b) is: +// At offset kDebugInputBindlessOffsetLengths is some number of uints which +// provide the bindless length data. More specifically, the number of +// descriptors at (set=s, binding=b) is: // Data[ Data[ s + kDebugInputBindlessOffsetLengths ] + b ] static const int kDebugInputBindlessOffsetLengths = 1; |