Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/KhronosGroup/SPIRV-Tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Gebben <jeremyg@lunarg.com>2022-11-10 20:35:18 +0300
committerGitHub <noreply@github.com>2022-11-10 20:35:18 +0300
commit68e8327f2932339422eb6a1043ff395e9e602402 (patch)
treebad0b3c4032d9a2ce5789fe0f3edbff91f5e29fc /include
parent996d4c021f7112356b305b7172fd722d02eefdb5 (diff)
Instrument: Change output buffer offset definitions (#4961)
Add a flags field at the first offset within this buffer. Define flags to allow buffer OOB checking to be enabled or disabled at run time. This is to support VK_EXT_pipeline_robustnes.
Diffstat (limited to 'include')
-rw-r--r--include/spirv-tools/instrument.hpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/include/spirv-tools/instrument.hpp b/include/spirv-tools/instrument.hpp
index a19491fd3..a75561b50 100644
--- a/include/spirv-tools/instrument.hpp
+++ b/include/spirv-tools/instrument.hpp
@@ -36,16 +36,25 @@ namespace spvtools {
// generated by InstrumentPass::GenDebugStreamWrite. This method is utilized
// by InstBindlessCheckPass, InstBuffAddrCheckPass, and InstDebugPrintfPass.
//
-// The first member of the debug output buffer contains the next available word
+// The 1st member of the debug output buffer contains a set of flags
+// controlling the behavior of instrumentation code.
+static const int kDebugOutputFlagsOffset = 0;
+
+// Values stored at kDebugOutputFlagsOffset
+enum kInstFlags : unsigned int {
+ kInstBufferOOBEnable = 0x1,
+};
+
+// The 2nd member of the debug output buffer contains the next available word
// in the data stream to be written. Shaders will atomically read and update
// this value so as not to overwrite each others records. This value must be
// initialized to zero
-static const int kDebugOutputSizeOffset = 0;
+static const int kDebugOutputSizeOffset = 1;
-// The second member of the output buffer is the start of the stream of records
+// The 3rd member of the output buffer is the start of the stream of records
// written by the instrumented shaders. Each record represents a validation
// error. The format of the records is documented below.
-static const int kDebugOutputDataOffset = 1;
+static const int kDebugOutputDataOffset = 2;
// Common Stream Record Offsets
//