aboutsummaryrefslogtreecommitdiff
path: root/source/validate.h
diff options
context:
space:
mode:
authorAndrey Tuganov <andreyt@google.com>2018-02-07 11:50:26 -0500
committerDavid Neto <dneto@google.com>2018-03-23 14:02:42 -0400
commitfe9121f72144f1e1657cd21a55a1fec07c940e56 (patch)
tree1682011404ca9284293601540a0b40b6b15027b7 /source/validate.h
parent045cc8f75b5679fa148a77801a5a9a59e3f2bc0a (diff)
downloadspirv-tools-fe9121f72144f1e1657cd21a55a1fec07c940e56.tar.gz
Add Vulkan validation rules for BuiltIn variables
Added a framework for validation of BuiltIn variables. The framework allows implementation of flexible abstract rules which are required for built-ins as the information (decoration, definition, reference) is not in one place, but is scattered all over the module. Validation rules are implemented as a map id -> list<functor(instrution)> Ids which are dependent on built-in types or objects receive a task list, such as "this id cannot be referenced from function which is called from entry point with execution model X; propagate this rule to your descendants in the global scope". Also refactored test/val/val_fixtures. All built-ins covered by tests
Diffstat (limited to 'source/validate.h')
-rw-r--r--source/validate.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/validate.h b/source/validate.h
index 10664d8e..a4f6dde2 100644
--- a/source/validate.h
+++ b/source/validate.h
@@ -117,6 +117,9 @@ spv_result_t InstructionPass(ValidationState_t& _,
/// Performs decoration validation.
spv_result_t ValidateDecorations(ValidationState_t& _);
+/// Performs validation of built-in variables.
+spv_result_t ValidateBuiltIns(const ValidationState_t& _);
+
/// Validates that type declarations are unique, unless multiple declarations
/// of the same data type are allowed by the specification.
/// (see section 2.8 Types and Variables)